Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Relay and Store. Is this possible with postfix

    I have been given the task of setting up a backup mx server for my work. I would like to use postfix for this as I am most familiar with it. But if there is another MTA more suited to the task I would be willing to learn it.

    The backup server needs to relay the mail to the main MX but also deliver a copy locally so it can be checked via POP. What would be the best way to achieve this? I think I have worked out how to do this in theory and I have the relay part working. But there are a few areas that I'm not sure about.

    1) Is it possible to remove the email from the mailbox when it has be successfully relayed?

    2) How can I stop postfix bouncing emails when they can't be relayed on.

    3) I was thinking of using recipient_bcc_maps, is there a better way of doing this?

  2. #2
    I have read many a many articles, and now have the basic backup MX running. I have managed to get it to also deliver a copy locally by adding:

    recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
    to /etc/postfix/ then /etc/postfix/recipient_bcc would look like this:

    doe@foo.tld localuser
    @foo.tld otherlocaluser
    @bar.tld anotherlocaluser

    This works nicely. The two problems that I have are that if mail cannot be delivered locally for lack of space or what ever it will bounce an error email to the sender and the same for relaying. One of them needs to be told not to bounce emails, not sure which one yet.

    The other is that the emails needs to be deleted from the local user Maildir when it is successfully relayed. I think I have a solution for this one. I have an IMAP interface setup (eventually for web-mail). I thought I could pipe the postfix log to a script that would parse the data and delete the email via IMAP when relayed. Can anyone see any potential problems with this? Has anyone done this before, someone must have!

Posting Permissions

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