On Fri, June 12, 2009 9:08 am, Stefan Palme said: > As far as I have understood, check_recipient_access in > smtpd_recipient_restrictions uses the original RCPT TO addresses for > lookup (and not on the results after resolving (virtual) aliases).
Correct. > I want all mails received for a certain user to put on HOLD > for a while (because I am repairing her IMAP mailbox). > > This user receives mail for a lot of (virtual) email addresses, e.g. > i...@example1.com, webmas...@example2.net, etc. > > Do I really have to write my check_recipient_access map in the form > > i...@example1.com HOLD > webmas...@example2.net HOLD > ... > > or is there a shorter way to do this, because all this mail addresses > are in the end aliased to the same "local" user account? > > Some of those email addresses are even aliased to more than one user. > So the bad side effect of the map as shown above would be, that NOBODY > receives mails targeted at e.g. i...@example1.com - but I only want to > prevent one special mailbox to not receive any mail... The only solution I can think of that isn't overcomplicated would be to clone the virtual or local transport in master.cf (depends on the address class of the domain) and use the transport table to redirect the final address to that transport. Then, use defer_transports to defer deliveries to the clones transport. Perhaps there are other solutions than suspending deliveries to the user's account? Why does the IMAP mailbox need to be "repaired"? How do you repair it and why does that operation require exclusive access to the mailbox? -- Magnus Bäck mag...@dsek.lth.se