Results 1 to 9 of 9

Thread: How do I configure Postfix to send outgoing mail via a relay?

  1. #1
    Join Date
    Apr 2006
    Beans
    Hidden!

    How do I configure Postfix to send outgoing mail via a relay?

    Hi all,

    I am using this guide.

    http://ubuntu-tutorials.com/2008/11/...-smtpgmailcom/

    But it is not working for me. When I check the logs, postfix is trying to send email directly instead of via the relay I configured.
    What am I missing.

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: How do I configure Postfix to send outgoing mail via a relay?

    Can you post your main.cf file? It shouldn't be too big.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: How do I configure Postfix to send outgoing mail via a relay?

    Quote Originally Posted by CharlesA View Post
    Can you post your main.cf file? It shouldn't be too big.
    Thank you for making me look at that file again to sanitize it before posting.
    I discovered that I was setting relayhost early up, but then later down I missed that it was being unset by another relayhost entry that was already there in the default file. After addressing that outgoing mail was sent, but not as I expected. When it reached the relay server (gmail) it not only stored the mail in gmail's sent folder but when the mail arrived at the intended recipient the from field was the gmail user!?!?! and not the original user that sent the email. sighs.
    Last edited by sefs; September 14th, 2013 at 10:56 PM.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: How do I configure Postfix to send outgoing mail via a relay?

    Ok, then it's working as intended.

    What did you want to accomplish?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: How do I configure Postfix to send outgoing mail via a relay?

    Quote Originally Posted by CharlesA View Post
    Ok, then it's working as intended.

    What did you want to accomplish?
    Send an email from a@domainX.com to b@domainY.com, and have it relayed from a to b vis mail.domainZ.com and to arrive at b@domainY.com with all sender information intact and not the sender information of the relayer.

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: How do I configure Postfix to send outgoing mail via a relay?

    You'd need to set up your own mail server for that.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: How do I configure Postfix to send outgoing mail via a relay?

    Quote Originally Posted by CharlesA View Post
    You'd need to set up your own mail server for that.

    domainX is my mailserver. Do you mean i would have to replace mail.domainZ.com with another mailserver of my creation?

  8. #8
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: How do I configure Postfix to send outgoing mail via a relay?

    Not sure, but the mail server at mail.domainZ.com would need to be setup to allow it to relay mail from domainX.

    Otherwise you can just have one mail server send mail for all your domains, if you set it up as such.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  9. #9
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: How do I configure Postfix to send outgoing mail via a relay?

    My ISP blocks outgoing 25, which is why I was trying with the relay thing.
    I think this is special behavior by the big G. I will have to find another relay server and test.
    Thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •