Specifying the "From" email address in mail? - Aix

This is a discussion on Specifying the "From" email address in mail? - Aix ; Hello. We have AIX 5.3 machine which is not directly connected to the Internet. However, when the machine send automatic email from applications to our trading partner recipients. The "From" email address of any mail that is sent out by ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Specifying the "From" email address in mail?

  1. Specifying the "From" email address in mail?

    Hello.

    We have AIX 5.3 machine which is not directly connected to the Internet.
    However, when the machine send automatic email from applications to our
    trading partner recipients. The "From" email address of any mail that is
    sent out by our AIX system is username@machine.company.local. How can we
    change this behavior so that any mail sent out by our AIX system is
    "userfirst.userlast@company.com?

    Thanks in advance.



  2. Re: Specifying the "From" email address in mail?

    On Jul 30, 1:52 pm, "C C" wrote:
    > Hello.
    >
    > We have AIX 5.3 machine which is not directly connected to the Internet.
    > However, when the machine send automatic email from applications to our
    > trading partner recipients. The "From" email address of any mail that is
    > sent out by our AIX system is usern...@machine.company.local. How can we
    > change this behavior so that any mail sent out by our AIX system is
    > "userfirst.userl...@company.com?
    >
    > Thanks in advance.


    You can use "mail -r replyto@address.com" to secify your reply to
    address or you can build a custom mail header with "replay-to:
    replyto@address.com" specified and send it out using sendmail, or
    lastly you can hack away at your sendmail.cf. I'm lazy so I just use
    mail -r ;-)


  3. Re: Specifying the "From" email address in mail?


    > address or you can build a custom mail header with "replay-to:
    > repl...@address.com"


    sorry...obviously that should be reply-to: custom@email.com

    like so:
    print "From: custom@email.com\nTo: cdeville@atxg.com\nReply-to:
    custom@email.com\nSubject: \"test e-mail\"" | sendmail -toi

  4. Re: Specifying the "From" email address in mail?


    "c00p" wrote in message
    news:4c22ef25-c8da-4776-a95f-89119ea5da78@34g2000hsf.googlegroups.com...
    >
    >> address or you can build a custom mail header with "replay-to:
    >> repl...@address.com"

    >
    > sorry...obviously that should be reply-to: custom@email.com
    >
    > like so:
    > print "From: custom@email.com\nTo: cdeville@atxg.com\nReply-to:
    > custom@email.com\nSubject: \"test e-mail\"" | sendmail -toi


    sorry but the scripts we are using use the "mail" command:
    print 'This is a test.'|mail -s Test -c "his.name@email.com
    her.name@email.com" to.name@email.com

    so, how can I tell "mail" to force the "From" of the resulting smtp mail our
    AIX system relays to our email gateway with the format my.name@email.com?

    Thanks in advance.



  5. Re: Specifying the "From" email address in mail?

    On 2008-07-30, C C wrote:
    >
    > so, how can I tell "mail" to force the "From" of the resulting smtp mail our
    > AIX system relays to our email gateway with the format my.name@email.com?


    You may add headers at the beginning of the mail's body. Try this:

    (echo "From: you@company.com" ; echo ; echo "Mail body, blah blah") | mail ...

    --
    Thomas Lecomte

  6. Re: Specifying the "From" email address in mail?

    Well, that doesn't work because the reverse lookup will still yield an
    incorrect domain! The SMTP "From:" address is still user@aix530.email.com.
    Our domain name is only email.com. The sendmail daemon adds the machine
    name "aix530" to the domain!



    "Thomas Lecomte" wrote in message
    news:slrng92sau.nlt.deather@ryna.hinyx.info...
    > On 2008-07-30, C C wrote:
    >>
    >> so, how can I tell "mail" to force the "From" of the resulting smtp mail
    >> our
    >> AIX system relays to our email gateway with the format my.name@email.com?

    >
    > You may add headers at the beginning of the mail's body. Try this:
    >
    > (echo "From: you@company.com" ; echo ; echo "Mail body, blah blah") | mail
    > ...
    >
    > --
    > Thomas Lecomte




  7. Re: Specifying the "From" email address in mail?

    The /etc/mail/sendmail.cf can be modified to meet the criteria you
    specify for what the server should display. Simply edit the following
    line and refresh sendmail.


    # my official domain name
    # ... define this only if sendmail cannot automatically determine your
    domain
    #Dj$w.Foo.COM
    Djcompany.com


    By adding the "Dj" entry, you can hide the machine that the message
    came from. I just tried it on my server. The original mail (with no Dj
    in use) shows as "user@machine.company.com" and when I activated Dj it
    became "user@company.com"

    Be sure to keep a copy of your original setup before making any
    changes to the file. It works for our server, but every company does
    their networking differently, and you may have issues with firewalls
    or Exchange servers that reject the mails because of certain changes
    you make.

    Steve

  8. Re: Specifying the "From" email address in mail?

    Thanks. I tried this but when I send a test mail to myself
    (myloginname@company.com), mail sent it to my dead.letter! It does not
    relay it to our relay server.

    "steven_nospam at Yahoo! Canada" wrote in message
    news:68e3eebd-e441-4e16-9e71-be2da1e4eb0a@l64g2000hse.googlegroups.com...
    > The /etc/mail/sendmail.cf can be modified to meet the criteria you
    > specify for what the server should display. Simply edit the following
    > line and refresh sendmail.
    >
    >
    > # my official domain name
    > # ... define this only if sendmail cannot automatically determine your
    > domain
    > #Dj$w.Foo.COM
    > Djcompany.com
    >
    >
    > By adding the "Dj" entry, you can hide the machine that the message
    > came from. I just tried it on my server. The original mail (with no Dj
    > in use) shows as "user@machine.company.com" and when I activated Dj it
    > became "user@company.com"
    >
    > Be sure to keep a copy of your original setup before making any
    > changes to the file. It works for our server, but every company does
    > their networking differently, and you may have issues with firewalls
    > or Exchange servers that reject the mails because of certain changes
    > you make.
    >
    > Steve




  9. Re: Specifying the "From" email address in mail?

    On Aug 5, 11:45*am, "C C" wrote:
    > Thanks. *I tried this but when I send a test mail to myself
    > (myloginn...@company.com), mail sent it to my dead.letter! *It does not
    > relay it to our relay server.
    >


    Hmm. Perhaps it works for us here because we forward our emails from
    the RS/6000 to our default mail server. In the /etc/mail/sendmail.cf
    file, we also have the "DS" option active, and use the FQDN in the /
    etc/hosts file.

    From the /etc/mail/sendmail.cf:
    ##########################
    # "Smart" relay host (may be null)
    # Relay host to forward outgoing mail not in the local domain to.
    # To forward ALL mail to this relay host, uncomment the appropriate
    # rule in ruleset 0, as indicated by the ruleset's comments.
    #DSmailer:relayhostname
    DSsmtp:mailserver.company.com


    From the /etc/hosts:
    #####################
    192.168.77.251 mailserver mailserver.company.com





  10. Re: Specifying the "From" email address in mail?

    Thanks.

    I have the DS in my sendmail.cf, too.

    Here's my network:
    -- Mail server: 192.168.0.13 (mail1.company.local)
    -- Aix host: 192.168.0.242 (aix.company.local)
    Note: Aix host is allowed to relay internet mail through our Mail server.

    Our internal domain is: company.local
    Our Internet domain name is: company.com

    Current sendmail.cf:
    Dj$w.company.com

+ Reply to Thread