2

im trying to setup posfix so i can send emails with a "free" domain name from http://freedns.afraid.org/.
i can receive mails alright, but sending is a different story...the mail bounces back with status: 5.0.0.

under mynetworks is 6.6.6.6 listed, this is the actual server ip...but the hoster (hetzner.de) adds another ip (1.2.3.4) to the system that is reachable via the internet.
The first one is not. i cant set a MX record for the host but as far as i read that is not needed.

this is the information to show you whats going on, please tell me if i missed important bits.

i replaced these values:
server ip: 1.2.3.4
dns name: somedomainname.strangled.net
target email: myuser.lala@mail.de
username: myuser

yes myuser is the system user and also part of the target / destination email.

when i send a mail like this:

echo "This is the body" | mutt -s "Testing mutt" myuser.lala@mail.de

this shows up int the log

Feb 18 15:37:44 andromeda postfix/pickup[6781]: 1EE9FC05B3: uid=1000   from=<myuser>
Feb 18 15:37:44 andromeda postfix/cleanup[6920]: 1EE9FC05B3: message-id=<20170218143744.7rc5vevuzcqltpfo@somedomainname.strangled.net>
Feb 18 15:37:44 andromeda postfix/qmgr[6134]: 1EE9FC05B3: from=<myuser@somedomainname.strangled.net>, size=477, nrcpt=1 (queue active)
Feb 18 15:37:44 andromeda postfix/error[6922]: 1EE9FC05B3:  to=<myuser.lala@mail.de>, relay=none, delay=0.07, delays=0.05/0.01/0/0.02,   dsn=5.0.0, status=bounced (mail.de)
Feb 18 15:37:44 andromeda postfix/cleanup[6920]: 2B2BAC090C: message-id=<20170218143744.2B2BAC090C@somedomainname.strangled.net>
Feb 18 15:37:44 andromeda postfix/qmgr[6134]: 2B2BAC090C: from=<>, size=2360, nrcpt=1 (queue active)
Feb 18 15:37:44 andromeda postfix/bounce[6923]: 1EE9FC05B3: sender non-delivery notification: 2B2BAC090C
Feb 18 15:37:44 andromeda postfix/qmgr[6134]: 1EE9FC05B3: removed
Feb 18 15:37:44 andromeda postfix/local[6925]: 2B2BAC090C: to=<myuser@somedomainname.strangled.net>, relay=local, delay=0.03, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Feb 18 15:37:44 andromeda postfix/qmgr[6134]: 2B2BAC090C: removed

and this is what mail.de replys, as you can see: Status: 5.0.0

[-- Attachment #2: Delivery report --]
[-- Type: message/delivery-status, Encoding: 7bit, Size: 0.3K --]

Reporting-MTA: dns; somedomainname.strangled.net
X-Postfix-Queue-ID: 1EE9FC05B3
X-Postfix-Sender: rfc822; myuser@somedomainname.strangled.net
Arrival-Date: Sat, 18 Feb 2017 15:37:44 +0100 (CET)

Final-Recipient: rfc822; someuser@mail.de
Original-Recipient: rfc822;someuser@mail.de
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; mail.de

dns lookup

dig somedomainname.strangled.net

; <<>> DiG 9.10.3-P4-Debian <<>> somedomainname.strangled.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17662
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1460
;; QUESTION SECTION:
;somedomainname.strangled.net. IN  A

;; ANSWER SECTION:
somedomainname.strangled.net. 3600 IN  A   1.2.3.4

;; Query time: 176 msec 
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Feb 18 15:42:20 CET 2017
;; MSG SIZE  rcvd: 95

revers dns

dig -x 1.2.3.4

; <<>> DiG 9.10.3-P4-Debian <<>> -x 1.2.3.4
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44643
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1460
;; QUESTION SECTION:
;4.3.2.1.in-addr.arpa.    IN  PTR

;; ANSWER SECTION:
4.3.2.1.in-addr.arpa. 43200 IN    PTR somedomainname.strangled.net.

;; Query time: 41 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Feb 18 15:44:44 CET 2017
;; MSG SIZE  rcvd: 94

/etc/mailname:
somedomainname.strangled.net.

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
bounce_notice_recipient = myuser@localhost
default_transport = error
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = ${myhostname} localhost.localdomain, localhost
mydomain = strangled.net
myhostname = mickeymouse.${mydomain}
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 6.6.6.6/32
myorigin = $myhostname
readme_directory = no
recipient_delimiter = +
relay_transport = error
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated defer_unauth_destination
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
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail/
virtual_mailbox_domains = andromeda
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000

any idea what i missed?

  • procmail hasn't been maintained in years, by the way – thrig Feb 18 '17 at 15:38
  • check your sending domains' SPF record, is your outbound IP listed? – Jacob Evans Feb 18 '17 at 16:33
1

The destination mail server (for mail.de) has chosen not to disclose the reason it rejected the mail. That reason should normally appear in the Diagnostic-Code line, but here they have replaced it with garbage.

You can guess that they reject mail from freedns hosted domains, which is a reasonable thing to do. But to be 100% sure of the reason for rejection, you will need to contact the postmaster for that domain and hope that they choose to tell you why it was rejected.

0

configuration should have worked a far as i know, it does with a "real" domain, one that is not a subdomain of a freedns provider.

the real domain does have a SPF record as was suggested by Jacob Evans. And also a MX record.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.