Results 1 to 6 of 6

Thread: how to redirect DEFERRED mail ?

  1. #1
    Join Date
    Jun 2008
    Location
    Near Cambridge England
    Posts
    52

    Question 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:
    Code:
    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!

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: how to redirect DEFERRED mail ?

    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.

  3. #3
    Join Date
    Jun 2008
    Location
    Near Cambridge England
    Posts
    52

    Default Re: how to redirect DEFERRED mail ?

    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?

  4. #4
    Join Date
    Mar 2009
    Location
    London
    Posts
    426

    Default Re: how to redirect DEFERRED mail ?

    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

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: how to redirect DEFERRED mail ?

    Quote Originally Posted by al1ster View Post
    any hints how? (I'm a hardware engineer - so keep it simple! )
    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.

  6. #6
    Join Date
    Jun 2008
    Location
    Near Cambridge England
    Posts
    52

    Thumbs up Re: how to redirect DEFERRED mail ?

    thanks Ken,

    worked a dream once I mastered typing 10024 instead of 1024


    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •