I have a problem with my Postfix configuration.
When i receive mail from the Internet, i check the mail (virus, address etc etc). If the check is ok, i send the mail to its destination.
I give the mail to a script and i check it. But i have a forwarding loop and i send infinite mail.
vi /var/log/mail.log Jul 28 14:48:41 ks****** postfix/local[19635]: D0A1B1C9AC: to=, relay=local, delay=0.12, delays=0.01/0/0/0.11, dsn=2.0.0, status=sent (delivered to command: /usr/lib/cgi-bin/test.php) Jul 28 14:48:41 ks****** postfix/qmgr[30839]: D0A1B1C9AC: removed Jul 28 14:48:41 ks****** postfix/qmgr[30839]: EA40D1C9AD: from=, size=2973, nrcpt=4 (queue active) Jul 28 14:48:41 ks****** postfix/local[19635]: warning: required alias not found: mailer-daemon Jul 28 14:48:41 ks****** postfix/local[19635]: EA40D1C9AD: to=, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (discarded) Jul 28 14:48:41 ks****** postfix/error[19647]: EA40D1C9AD: to=, orig_to=, relay=none, delay=0.04, delays=0.02/0.01/0/0.01, dsn=5.1.3, status=bounced (bad address syntax) Jul 28 14:48:43 ks****** postfix/smtp[18177]: EA40D1C9AD: to=, relay=b.mx.mail.yahoo.com[66.196.82.7]:25, conn_use=2, delay=1.1, delays=0.02/0/0.09/0.95, dsn=2.0.0, status=sent (250 ok dirdel) Jul 28 14:48:43 ks****** postfix/local[19635]: EA40D1C9AD: to=, relay=local, delay=1.2, delays=0.02/0.01/0/1.1, dsn=5.4.6, status=bounced (mail forwarding loop for root@ks******.kimsufi.com) Jul 28 14:48:43 ks****** postfix/cleanup[19633]: 1F3F71C9A9: message-id= Jul 28 14:48:43 ks****** postfix/qmgr[30839]: 1F3F71C9A9: from=, size=5017, nrcpt=1 (queue active) Jul 28 14:48:43 ks****** postfix/bounce[19648]: EA40D1C9AD: sender non-delivery notification: 1F3F71C9A9 Jul 28 14:48:43 ks****** postfix/qmgr[30839]: EA40D1C9AD: removed Jul 28 14:48:43 ks****** postfix/pickup[18314]: 3889F1C9AD: uid=0 from= Jul 28 14:48:43 ks****** postfix/cleanup[19633]: 3889F1C9AD: message-id= Jul 28 14:48:43 ks****** postfix/local[19635]: 1F3F71C9A9: to=, relay=local, delay=0.12, delays=0.01/0/0/0.11, dsn=2.0.0, status=sent (delivered to command: /usr/lib/cgi-bin/test.php) Jul 28 14:48:43 ks****** postfix/qmgr[30839]: 1F3F71C9A9: removed Jul 28 14:48:43 ks****** postfix/qmgr[30839]: 3889F1C9AD: from=, size=5216, nrcpt=4 (queue active) Jul 28 14:48:43 ks****** postfix/local[19635]: warning: required alias not found: mailer-daemon Jul 28 14:48:43 ks****** postfix/local[19635]: 3889F1C9AD: to=, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (discarded) Jul 28 14:48:43 ks****** postfix/error[19647]: 3889F1C9AD: to=, orig_to=, relay=none, delay=0.03, delays=0.02/0/0/0.01, dsn=5.1.3, status=bounced (bad address syntax)
postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix default_privs = www-data html_directory = /usr/share/doc/postfix/html inet_interfaces = all inet_protocols = ipv4 mailbox_size_limit = 0 mydestination = ks******.kimsufi.com, localhost.kimsufi.com, , localhost myhostname = ks******.kimsufi.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname notify_classes = resource, software readme_directory = /usr/share/doc/postfix recipient_delimiter = + relay_domains = mysql:/etc/postfix/mysql-rd.cf relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_client_restrictions = permit_mynetworks smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, reject_non_fqdn_recipient smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_unverified_sender smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes transport_maps = mysql:/etc/postfix/mysql-transport.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_aliases.cf,mysql:/etc/postfix/mysql-virtual_aliases_comptes.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /var/spool/vmail/ virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domaines.cf virtual_uid_maps = static:5000
.forward |/usr/lib/cgi-bin/test.php