Andy,

Should work just fine.  Google "postfix relay_recipient_maps mysql”.  I have a 
similar issue in that my two edge servers deliver email to an Exchange server 
which is where user account live.  The only difference is that I’ve been using 
LDAP rather than mysql.  I also depend heavily on LDAP for aliases and and 
group distribution lists.  If Postfix couldn’t do that kind of stuff I don’t 
know what I would do.  And so I’d bet that with a little googling around you 
would discover how to do aliases out of mysql as well.

Good luck.

Rob Tanner
UNIX Services Manager
Linfield College, McMinnville Oregon

ITS will never ask you for your password.  Please don’t share yours with anyone!

On Apr 16, 2014, at 3:00 PM, Andy Yen 
<[email protected]<mailto:[email protected]>> wrote:

Hi postfixers,
       To send fewer email bounce messages, I would like to reject messages at 
the SMTP session if either the user doesn't exist, or the user has exceeded 
their quota. My mail setup is a bit different in that I only use postfix for 
receiving messages, user accounts and local storage is handled completely 
outside of postfix. What I do have is a custom mysql table that lists usernames 
in my mail system, and whether they have exceeded quota or not. I can of course 
reformat this table or duplicate it.

Is there a way to have postfix look in this mysql table, verify the user exists 
and is not over quota, and then reject or accept the message within the SMTP 
session?

Looking through the docs, there doesn't appear to be an out of the box way to 
do this, but perhaps there is a way to take advantage of how postfix currently 
does its user lookup at this stage of message processing to achieve this 
functionality? Or is my only option to go in and modify the source code?

Cheers,
Andy

Reply via email to