I have searched to no avail. I cannot seem to figure out how to add a forward to my current setup. I used this to get it up and running, and a combo of posts to add SpamAssasin+Procmail. I have 2 domains for email, one that is actually hosted on my server and the other which is supposed to be a catch-all-and-forward.
Here is my configs:
POSTFIX
MYSQL
main.cf Code:## MISCsmtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no recipient_delimiter = + mailbox_size_limit = 0 ## AUTH & SECURITY smtpd_tls_cert_file=/etc/ssl/certs/dovecot.pem smtpd_tls_key_file=/etc/ssl/private/dovecot.pem smtpd_use_tls=yes smtpd_tls_auth_only = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination ## IP ADDRESSES & DOMAIN NAMES myhostname = mail.twprogrammers.com myorigin = /etc/mailname mydestination = localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 inet_interfaces = all ## VIRTUAL USERS, MAILBOXES, ALIASES, ECT. alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases virtual_transport = procmail virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cfmaster.cf Code:smtp inet n - - - - smtpdpickupfifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgrunix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounceunix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verifyunix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp relay unix - - - - - smtp showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scacheunix - - - - 1 scache procmail unix - n n - - pipe flags=RO user=vmail argv=/usr/bin/procmail -t -m USER=${user} EXTENSION=${extension} RECIPIENT=${recipient} /etc/procmail/main.rc uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmailunix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix-nn-2pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}mysql-virtual-alias-maps.cf Code:user = mailuser password = REMOVED hosts = 127.0.0.1 dbname = mailserver query = SELECT IFNULL(a.destination,u.email) AS destination FROM virtual_aliases a INNER JOIN virtual_users u ON a.destination=u.email WHERE a.source='%s' OR u.email='%s'mysql-virtual-mailbox-maps.cf Code:user = mailuser password = REMOVED hosts = 127.0.0.1 dbname = mailserver query = SELECT 1 FROM virtual_users WHERE email='%s'mysql-virtual-mailbox-domains.cf Code:user = mailuser password = REMOVED hosts = 127.0.0.1 dbname = mailserver query = SELECT 1 FROM virtual_domains WHERE name='%s'
What am I doing wrong? How can I fix it so that all mail to hawkladybeadry.com is forwarded to the satx.rr.com address?
virtual_aliases
id domain_id source destination 1 1 REMOVED@twprogrammers.com REMOVED@twprogrammers.com 2 1 REMOVED@twprogrammers.com REMOVED@twprogrammers.com 3 1 REMOVED@twprogrammers.com REMOVED@twprogrammers.com 100 1 @twprogrammers.com REMOVED@twprogrammers.com 101 3 @hawkladybeadery.com REMOVED@satx.rr.com virtual_domains
id name 1 twprogrammers.com 2 mail.twprogrammers.com 3 hawkladybeadery.com 4 mail.hawkladybeadery.com virtual_users
id domain_id password 1 1 HASHEDPASS REMOVED@twprogrammers.com 2 1 HASHEDPASS REMOVED@twprogrammers.com 3 1 HASHEDPASS REMOVED@twprogrammers.com
EDIT:
When I send a message to say -- test@hawkladybeadery.com it bounces back with this:
This Message was undeliverable due to the following reason:
Each of the following recipients was rejected by a remote mail server.
The reasons given by the server are included to help you determine why
each recipient was rejected.
Recipient: <test@hawkladybeadery.com>
Reason: 5.1.1 <test@hawkladybeadery.com>: Recipient address rejected:
User unknown in virtual mailbox table
Please reply to <Postmaster@email.rr.com>
if you feel this message to be in error.
Open Attachment: []
{MESSAGE}
--- Forwarded Message --- Date: [{DATE}]From: {FROM} To: test@hawkladybeadery.com Subject: {SUBJECT}
Bookmarks