1

I'm attempting to setup a postfix relay system for my LAN. A lot of my services are blocked from WAN access and I want to be able to get notifications from them.

As it stands it currently "works" but each e-mail is accompanied by a "Mailer Deamon Undeliverable" e-mail because it's sending correctly but always trying to BCC: [email protected] which doesn't resolve. I only use @domain.com for e-mail.

Here is my config for a "guest" VM (sends via the relayhost), I've tried a bunch but am out of ideas any help is appreciated.

I wonder If I can fix this somehow in the relayhost vs the guests?

/etc/postfix/main.cf smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = domain.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = domain.com mydestination = domain.com, localhost relayhost = smtp.domain.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = loopback-only inet_protocols = all masquerade_domains = domain.com #THINGS I HAVE TRIED...## #smtp_header_checks = regexp:/etc/postfix/header_checks #transport_maps = hash:/etc/postfix/transport #smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/bad_recipients, permit_mynetworks, reject_unauth_destination, permit #transport_maps = pcre:/etc/postfix/transport_maps #smtp_generic_maps = hash:/etc/postfix/generic /etc/aliases postmaster: root root: [email protected] trash: /tmp/mail.trash 

1 Answer 1

1

I had an issue with mydestination. I should not have had domain.com in that field. I removed it and set it to mydestination = hostname hostname.domain.com localhost and now it works as expected.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.