LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix filter outgoing mail by sender domain (https://www.linuxquestions.org/questions/linux-server-73/postfix-filter-outgoing-mail-by-sender-domain-814756/)

dmfelix 06-17-2010 11:44 AM

postfix filter outgoing mail by sender domain
 
Hi,

Im trying to get postfix to filter my outgoing mail and basically drop everything that is not in my hash table. So far I managed to get this going

Code:

...
smtpd_sender_restrictions =
        check_sender_access hash:/etc/postfix/sender_domains
        reject_non_fqdn_sender
        reject_unknown_sender_domain
        reject
...

and /etc/postfix/sender_domains looks like

Code:

foo.com ACCEPT
bar.com ACCEPT

Unfortunately those rules also apply to incoming messages. My goal is to disallow users on my host to change their "MAIL FROM" to anything they like and restrict them to domains I specify. I'm aware that the local part still is variable and a user of domain "foo.com" could use a email of domain "bar.com", but still some of my troubles would be solved if I get this running. Thanks for suggestions

cheers
felix

Berhanie 06-17-2010 01:16 PM

Hi. You could use smtp authentication. You might find this interesting.

dmfelix 06-18-2010 03:32 AM

Quote:

Originally Posted by Berhanie (Post 4006772)
Hi. You could use smtp authentication. You might find this interesting.

I do use sasl, but forcing strong passwords on customers is another issue. My latest problem was some guy getting hacked and spam got sent out by his account with forged MAIL FROM's, which is basically what I want to suppress...


All times are GMT -5. The time now is 02:50 AM.