Linode Forum
https://forum.linode.com/

Postfix virtual mailbox whitelist?
https://forum.linode.com/viewtopic.php?f=11&t=2794
Page 1 of 1

Author:  A32 [ Mon Jul 09, 2007 12:51 am ]
Post subject:  Postfix virtual mailbox whitelist?

Hi,

Would it be possible to configure postfix to accept email from only 1 domain for 1 virtual mailbox and leave the rest alone?

Say that my public email address used to accept payments from PayPal is paypal@mydomain.com

Now, bots get to conveniently troll websites for the email address in the Buy Now forms, etc and proceed to hit me with tons of spam.

The only emails I wish to have accepted for delivery to this address are from paypal.com and nobody else.

Now, I have other virtual accounts on my postfix server so how would I go about doing this without affecting delivery to my other virtual addresses?

Thanks!!

Author:  SteveG [ Tue Jul 10, 2007 3:39 pm ]
Post subject: 

http://www.postfix.org/RESTRICTION_CLASS_README.html

The example of protecting an e-mail list should do what you want, if I understand correctly.

Author:  A32 [ Tue Jul 10, 2007 9:48 pm ]
Post subject: 

Hmmm. Maybe I'm just daft but from what I can see, that text describes making a global restrictive policy.

I just want to restrict people from sending mail to 1 address out of many virtual ones.

so let's say I have:

v@y.com
w@y.com
x@y.com
y@y.com
z@y.com

But if anybody tries to send email to y@y.com, reject it outright if it's not from some@domain.com

I didn't see any way to do that from what I read. Or am I missing something?

Thanks

Author:  pclissold [ Wed Jul 11, 2007 12:41 pm ]
Post subject: 

Restriction classes should do it - it's a very specific application of what was designed as a general method. The authorisation is based on the sender SMTP envelope address, so it can be spoofed.

Put in /etc/postfix/main.cf:
Code:
smtpd_recipient_restrictions = 
check_recipient_access hash:/etc/postfix/protected_destinations
...the usual stuff...

smtpd_restriction_classes = authorised_senders
authorised_senders = check_sender_access hash:/etc/postfix/OK_senders, reject


Put in /etc/postfix/protected_destinations:
Code:
y@y.com   authorised_senders 


Put in /etc/postfix/OK_senders:
Code:
some@domain.com   OK 

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/