Skip to content

MX fails to deliver mail because it sets the wrong domain

mail_receiver.py fails with the following:

2014-06-26 17:18:07+0000 [-] Processing new mail at '/var/mail/vmail/Maildir/new/1403803087.Vfe01I60ac6M485214.chipmonk'
2014-06-26 17:18:07+0000 [-] Don't know how to deliver mail '/var/mail/vmail/Maildir/new/1403803087.Vfe01I60ac6M485214.chipmonk', skipping...

Current MX mail_receiver.py code sets the local MX domain as index 0 of the following tuple:

root@chipmonk:~# python -c "import socket; print socket.gethostbyaddr(socket.gethostname())"
('chipmonk', ['chipmonk.cdev.bitmask.net', 'chipmonk.cdev.bitmask.i'], ['127.0.1.1'])

That value is compared with the hostname in the Delivered-To header, which maps to 'chipmonk.cdev.bitmask.net'.

We should:

  • Check what has changed in platform or python that changed the result of @gethostbyaddr()@.
  • Adapt mail_receiver.py to work with the expected result(s) of the above fuction.

(from redmine: created on 2014-06-30, closed on 2014-07-21, relates #6858 (closed))

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information