Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Postfix Documentation
Previous Page Home Next Page


In order to set up an autoreply for virtual recipients while still delivering mail as normal, set up a rule in a virtual alias table:

virtual_alias_maps = hash:/etc/postfix/virtual

    [email protected] [email protected], [email protected]@autoreply.

This delivers mail to the recipient, and sends a copy of the mail to the address that produces automatic replies. The address can be serviced on a different machine, or it can be serviced locally by setting up a transport map entry that pipes all mail for autoreply. mydomain.tld into some script that sends an automatic reply back to the sender.

DO NOT list autoreply. mydomain.tld in mydestination!

transport_maps = hash:/etc/postfix/transport

mydomain.tld  autoreply:

    # =============================================================
    # service type  private unpriv  chroot  wakeup  maxproc command
    #               (yes)   (yes)   (yes)   (never) (100)
    # =============================================================
    autoreply unix  -       n       n       -       -       pipe
        flags= user=nobody argv=/path/to/autoreply $sender $mailbox

This invokes /path/to/autoreply with the sender address and the [email protected] recipient address on the command line.

For more information, see the pipe(8) manual page, and the comments in the Postfix file.

Postfix Documentation
Previous Page Home Next Page