iredapd

 

在背景行的 Program

python /opt/iredapd/src/iredapd.py /opt/iredapd/etc/iredapd.ini

 

code: /opt/iredapd/plugins/sql_user_restrictions.py

119             if all_allowed_senders:
120                 if sender in all_allowed_senders \
121                    or '@' + sender_domain in all_allowed_senders \
122                    or '@.' + sender_domain in all_allowed_senders \
123                    or '@.' in all_allowed_senders:
124                     return SMTP_ACTIONS['accept']

 

usage:

mysql> USE vmail;

UPDATE mailbox SET allowedsenders='@A.com,@B.com', rejectedsenders='@.', allowedrecipients='@A.com,@B.com', rejectedrecipients='@.' WHERE username='[email protected]';

log:

2014-03-19 18:02:05 INFO [202.69.74.90] A@internal -> B@internal, DUNNO
2014-03-19 18:02:39 INFO [202.181.201.11] tim@outside -> B@internal, REJECT Not authorized

 

 

Creative Commons license icon Creative Commons license icon