how to redirect DEFERRED mail ?

Following a system crash this week, I recovered my email server with the SUSE 11.1 distro disk and it had a side effect of changing my master.cf for postfix.

All my mail that was backed up during the crashed period then got dumped into the DEFERRED queue because it tried to deliver it to a non existent port address for amavis or clamav.
with error messages thus:

connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

trouble is, even though I corrected the master.cf, it still keeps trying to deliver these several hundred mails (and spams) to port 10024 - which is unused. In the meantime its back-spamming everyone with “deferred” messages.

Is there a way I can get it to just redirect these mails before it deletes them?

(I’ve tried “postfix flush” - but it didn’t help)

any help gratefully received!

Did you restart postfix after you corrected master.cf?

Perhaps you could change the config temporarily to have postfix listen on 10024 as well to accept the mail. I haven’t thought about this in depth so I don’t know if this will create a loop so caveat emptor.

Did you restart postfix after you corrected master.cf?

Perhaps you could change the config temporarily to have postfix listen on 10024 as well to accept the mail.
yes. no joy

any hints how? (I’m a hardware engineer - so keep it simple! ;))

or how could I get it all into /var/log/myemail from where I could easily filter and redirect it?

al1ster <al1ster@no-mx.forums.opensuse.org> writes:

>> Did you restart postfix after you corrected master.cf?
>>
>> Perhaps you could change the config temporarily to have postfix listen
>> on 10024 as well to accept the mail.yes. no joy
>
>
> any hints how? (I’m a hardware engineer - so keep it simple! ;))
>
> or how could I get it all into /var/log/myemail from where I could
> easily filter and redirect it?

Hi,

I recently (yesterday) made my mail go to ‘/var/mail/barry’ as it used to
with openSUSE 11.1, rather than ~/Maildir.

To get my mail to go to ‘/var/mail/barry’ all I did was comented out the
line ‘home_mailbox = Maildir/’ in the file ‘/etc/postfix/main.cf’.

Hope this helps.


Regards,
Barry Nichols

Pretty obvious when you look at the format of master.cf and read man 5 master. Just dupe the line starting smtp and ending with smtpd, and change the smtp to localhost:10024.

thanks Ken,

worked a dream once I mastered typing 10024 instead of 1024 :slight_smile:

I’ll study that man page further too.

@Barry - thanks for tying to help, but that didn’t work because my emails were already in the Postfix spool area (somehow) tagged with the non-existent port address (and I don’t use maildir format).

case closed!