LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix- Stop Relaying for Specific Sending Domains (https://www.linuxquestions.org/questions/linux-server-73/postfix-stop-relaying-for-specific-sending-domains-4175449968/)

jon_the_eye 02-13-2013 05:20 AM

Postfix- Stop Relaying for Specific Sending Domains
 
Hi List

We have setup a postfix server with Sasl and its all working fine.

We let a number of clients relay through us as we host their email on this and other servers. We do this as they often can't find their ISPs SMTP host details, or they are mobile and moving between networks.

We have been handing out a dummy user account, like "relay@localdomain" with a password, which is all working, even on port 587.

We have had a couple of clients leave, who are continuing using it. OK I could reset the password and wait for the phone to start ringing, but what I would like to do is block some "from" domains - even though they have successfully authenticated. Is this possible?

I tried adding a line to end of my main.cf
smtpd_sender_restrictions = hash:/etc/postfix/excustomers

the "excustomers" was a text file:
myoldcustomer.com REJECT

But the server stopped responding entirely on port 25.

Any help appreciated.

jon_the_eye 02-13-2013 05:29 AM

Hi

Ignore this post. I have just fixed it.

I forgot to postmap excustomers as it was looking for an excustomers.db file.

I have run a test and "Sender address rejected: Access denied"


All times are GMT -5. The time now is 12:21 AM.