Postfix main.cf example debian11/28/2023 ![]() "mytransportname" can be whatever you want it's used below in master.cf: mydomain.tld mytransportname: (1) Create /etc/postfix/virtual_aliases to add a catch-all alias - localuser needs to be an existing local user: Create /etc/postfix/transport to add a transport mapping. Set /etc/postfix/main.cf to use the transport db for transport_maps, and the alias db for virtual_alias-maps.Set up the handler in /etc/postfix/master.cf to pipe mail to the script.Compile the db files into berkeley db format that postfix wants.Set up a db file to map the 'transport' for the domain in question to a special handler.Set up a db file to handle aliases (and add a catch-all alias).I dropped the maildir_command part, and went with transport_maps. Ok, I just got this working - though hairier than I thought it would be. # information on enabling SSL in the smtp client. # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for Smtpd_tls_session_cache_database = btree:$/smtp_scache Smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key Smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem # Uncomment the next line to generate "delayed mail" warnings Smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) # line of that file to be used as the name. ![]() # Debian specific: Specifying a file name will cause the first Is there a magic invocation I can use to get all known and unknown users to go to the script as well?įull /etc/postfix/main.cf follows - it's the default Ubuntu 10.04, with the exception of the mailbox_command line: # See /usr/share/postfix/main.cf.dist for a commented, more complete version I tried setting local_recipient_maps= (empty string), but the message is still bounced (unknown user). I tried setting luser_relay to a local user, but this pre-empts mailbox_command, and so the command doesn't get run. ![]() This works great if the user is a local user, but it fails for "unknown" users who don't have aliases. I've tried configuring mailbox_command in /etc/postfix/main.cf: mailbox_command = /path/to/myscript.py Using postfix, I'd like all incoming mail, to any address (including those that don't map to local users) to be piped to a script.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |