LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix allow relay by "FROM:" domain (https://www.linuxquestions.org/questions/linux-server-73/postfix-allow-relay-by-from-domain-486584/)

paddyjoy 09-24-2006 05:06 PM

postfix allow relay by "FROM:" domain
 
Hi,

Is it possible to allow users to relay mail if the mail has a from address of *@mydomain.com? I have got this working by IP address but this is no good if users travel a lot.

Paddy

Berhanie 09-24-2006 09:56 PM

It's safer to use SMTP authentication, because with what you want to do, your system could be open to abuse.
But here's what you asked for. In main.cf:
Code:

smtpd_recipient_restrictions =
  permit_mynetworks
  check_sender_access hash:/etc/postfix/sender_access
  reject_unauth_destination

sender_access:
Code:

mydomain.com  OK
Then,
Code:

# postmap /etc/postfix/sender_access
# postfix reload


paddyjoy 09-24-2006 10:56 PM

Thanks for that, might go with the SMTP authentication if it is safer.

Paddy

Child of Wonder 09-25-2006 09:08 AM

Your mail server will get blacklisted very quickly and frequently if you allow relaying based only on the from domain. Anyone can connect to your server and use @yourdomain.com as a from address and, trust me, SPAMMERS DO THIS ALL THE TIME.

Set up SMTP Auth with SASL. It's easy to do and there's lots of how tos out there. Just Google it.

paddyjoy 09-25-2006 05:02 PM

Thanks I have set up SMTP auth now.

Paddy


All times are GMT -5. The time now is 05:26 AM.