Showing posts with label postfix. Show all posts
Showing posts with label postfix. Show all posts

2013-07-30

Postfix: temporarily suspend mail delivery (soft bounce)

When migrating our production RT instance to a new server recently, we needed to set up a "soft bounce" in Postfix -- essentially, to tell Postfix to keep incoming mails in the queue, but not deliver them.

My colleague came up with this (i.e., lines to go in @/etc/postfix/main.cf@):
## for rejecting all mails temporarily
transport_maps = static:retry
soft_bounce = yes

2013-07-25

Postfix: how to set envelope sender address, Return-Path

This is the kind of thing that only appears difficult at first, but in reality is quite easy.

We run a piece of software that sends out emails. The envelope sender address is wwwrun@ourdomain. This is because the Apache2 process runs as the wwwrun user. I need to change the envelope sender address (and hence the Return-Path: as well) to different_address@ourdomain

The fix turned out to be very easy:
# man canonical
# vim /etc/postfix/canonical
[add line 'wwwrun   rt_internal' at bottom of file]
# postmap /etc/postfix/canonical

2013-02-28

Postfix: delete message from queue

  1. Use mailq to find out message number.
  2. Use postsuper -d [msg_num] to delete the message.




2013-02-21

Postfix configuration notes

  • Connection refused: look at inet_interfaces - e.g.
    inet_interfaces = $myhostname, localhost