0

I am in need of serious help. I have been on Google, Stackoverflow, Postfix's website and numerous forums. I am officially stuck, I even tried to replicate another machine's config files.

The Problem:

I am trying to set up Thunderbird to catch postmaster emails. I want to do this using Postfix.

There is a site hosted through Apache on localhost, dev1.testdomain.com and dev2.testdomain.com.

Typically localhost and dev2.testdomain.com points to the same hosted application (Mono... Not Important).

There is a web.config file for each hosted application, in there we can set an attribute that points to the postmaster email address. Typically that email address will be the same as the one set up in Thunderbird which receives all the postmaster emails.

Further information:

Postmaster email needs to be: postmaster@mycomputer.com

Computer name: developmentmachine

Administrator User Account: developer

I tried doing a "Maildir" type setup and can not get that working.

Can anyone please give me a step by step instruction on how to implement something like this?

Please do not post links to other websites, as I have tried about all of them on Google and could not get it working.

Or can someone please tell me what I am doing wrong?

What i have currently:

/etc/aliases

postmaster:    developer

/etc/mailname

mycomputer.com

Postfix standard internet site installation.

/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

myhostname = developmentmachine
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mycomputer.com, developmentmachine, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
mailbox_command =
luser_relay = postmaster@mycomputer.com
notify_classes = bounce, 2bounce

Any help will be much appreciated, I have tried everything now.

Thank you in advance.

UPDATE: Got it to copy files into Maildir/, still having issues getting it into Thunderbird.

Tried installing and configuring Dovecot and no luck.

  • What event causes the email to be sent, what process sends it, and how/where is it dropped? (eg tcp/25 to localhost, via sendmail cmd)? – John Mee May 22 '14 at 4:24
  • Well it gets done though the application. Microsoft library (System.Net.Mail.SmtpClient). Also i have a missing file so it should send out an email saying the file is missing. It should go to postmaster@mycomputer.com. Not entity sure which port it uses, I would guess it is the default tcp/25 port. It will be coming off a mono-server4 process as the application is hosted on Apache with mono. – Shane Van Wyk May 22 '14 at 4:47
  • so what do the logs say? – natxo asenjo May 22 '14 at 6:17
  • At the moment the application delivers nothing to the log. The only way i could get something to the log was by doing a manual telnet email, it went to the "Mairdir/new" folder Then it was gone when I rebooted the computer I think. – Shane Van Wyk May 22 '14 at 21:09
2

I can't give you a definitive answer because there are a lot of things at play here. But I can offer a couple of approaches to help you help yourself:

Attack from the top:

Work on the application/configuration till you witness it dropping mail into the mail log. I'd do something like tail -f /var/log/mail.log in one window and play with the appconfig and whatever it is that trigger the email in another. When you see the mail appear in the log then you know your app is sending mail to the right place.

Attack from the bottom:

Work on configuring postfix to route email to the postmaster. Bypass the app by using mailx or telnet, to drop mail into the queue and keep playing around with it until it delivers the mail as you seek.

Be self-conscious of where you are on the learning curve:

Given the absence of any mention seems you might not appreciate the difference between postfix - an MTA - and an MDA. MailDirs is a form of MDA - which postfix - the MTA delivers to.

So in all you've got a lot of different components. MDA, MTA, Application, Apache, Mono. If you want to win this battle you may well have to break 'em down, understand, and test and solve each piece of the puzzle separately, before getting the end-to-end solution.

  • Thank you for your advice John. I am very new to this. I managed to get it working last year after spending about 2 weeks playing around. But now it's back to the playing around and getting it to work again and trying to document the steps so I know for the next computer. – Shane Van Wyk May 22 '14 at 21:12
  • I have now installed "mailutils" and ran echo 'this is a test' | mail -s 'test message' developer@mycomputer.com. I can see the message in Maildir/new but can't get that email into Thunderbird at all, I have done a POP account setup using developer@mycomputer.com using localhost and username as developer. Causing me a big headache. – Shane Van Wyk May 23 '14 at 4:18
  • I glossed over some detail there: maildirs is not really a Mail Delivery Agent, but more like a file store; it doesn't provide a POP server. You'd need a delivery agent that provides POP to feed it into thunderbird that way. I wouldn't worry about that part for now; just check the mail with mail or mailx - whichever can read maildirs. – John Mee May 23 '14 at 5:10
  • Well I got it working with some help from a similar post in Stack overflow and playing around to the extent that it goes to Maildir/new. Now I need to figure out how Thunderbird will pull that in, typically on another machine it sits in Maildir/new until Thunderbird pulls it in then it moves the file to Maildir/cur – Shane Van Wyk May 25 '14 at 23:35

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.