Operating System - HP-UX
1752795 Members
6046 Online
108789 Solutions
New Discussion юеВ

How to deal with mail account with blank space ?

 
Nicolas Dumeige
Esteemed Contributor

How to deal with mail account with blank space ?

Hello

I'm sending a mail this way
cat message.txt | mailx -s "$SUBJECT" 'Admin PAR-PEOPLESOFT-GL@orga.com"'

As you can see the account(alias) has a blank space.

Il get this error :
Admin... User unknown
Saved message in /.../dead.letter

How can deal with this ?

Thanks for you help
All different, all Unix
7 REPLIES 7
Chris Wilshaw
Honored Contributor

Re: How to deal with mail account with blank space ?

You appear to have a mis-matched set of quotes.

At the start of the account name, you have

'

at the end you have

"'

Have you tried using "Admin PAR-PEOPLSOFT-GL@orga.com"
Nicolas Dumeige
Esteemed Contributor

Re: How to deal with mail account with blank space ?

This is a typo.
All different, all Unix
Colin Topliss
Esteemed Contributor

Re: How to deal with mail account with blank space ?

That isn't a valid mail address (not in that context anyway).

Do you actually mean you want something like:
cat message.txt | mailx -s "$SUBJECT" "Admin"

That seems to parse OK.

What they will see is an email from the account "Admin" - when they expand Admin, they'll get the return address of the user/host that sent the mail.

Is this what you were after?

Col.
Nicolas Dumeige
Esteemed Contributor

Re: How to deal with mail account with blank space ?

Colin,

I think "Admin PAR-PEOPLESOFT-GL@orga.com" is an alias (Lotus Notes), but I don't know any other adress.

Don't you see any work around for this ?

All different, all Unix
Colin Topliss
Esteemed Contributor

Re: How to deal with mail account with blank space ?

This just doesn't sound quite right.

You can define an alias locally for sendmail (so you just type Admin and have that expand to PAR-PEOPLESOFT-GL@orga.com)
This requires changes on your mail client though.

You'd type:
cat message.txt | mailx -s "$SUBJECT" Admin@orga.com

after adding support /etc/mail/aliases and rebuilding the aliasdb.

You can omit their alias and just send it to PAR-PEOPLESOFT-GL@orga.com
Not sure quite where it would end up though.

You'd type:
cat message.txt | mailx -s "$SUBJECT" PAR-PEOPLESOFT-GL@orga.com

You might even be able to get away with just:
cat message.txt | mailx -s "$SUBJECT" Admin@orga.com

and Lotus Notes should be able to work out where (or who) to route the mail to. I seem to recall that Lotus Notes has a similar concept of aliases.

From the notes I can find, I'm sure that you only need to send the mail to the INTERNET address, not the Lotus alias/internet address (which, if you think about it and as you have already seen, invalidates that address).

If you can, get them to send you an email - then you can look at the return address. The return address is the one you should be using.

Col.
Nicolas Dumeige
Esteemed Contributor

Re: How to deal with mail account with blank space ?

A collegue has told me that he use :
Admin.PAR-PEOPLESOFT-GL@orga.com

I'll see tomorow if this work

Thanks for you help anayway
All different, all Unix
Colin Topliss
Esteemed Contributor

Re: How to deal with mail account with blank space ?

That seems much more like it. *Now* the address is a valid Internet address!

Good luck - let us know how it goes.

Col