# Which MTA to use with Dovecot in a jail?



## dvl@ (Oct 18, 2013)

I'm planning to deploy a personal dovecot IMAP server (i.e. I am the only user) in a FreeBSD jail.

At present, I have IMAP deployed on the same host as one of my mail servers, which is running Postfix.  I do like Postfix, but it seems to be a bit overkill for this particular situation. 

All my incoming MX are provided by Google.  They handle the incoming mail and forward to my private MX, and from there the mail for me goes into my ~/Maildir.

With the move to IMAP in a jail, I need to get the mail from my private MX into that jail.  All mail being sent to that jail will be destined for my ~/Maildir, with some massaging via procmail.

Given that I've just started using mail/nullmailer, I was wondering if there was something simple that I could use.

I was planning to use postfix, require TLS, lock things down tightly.  But I'm open to suggestions for something simple.


----------



## ShelLuser (Oct 18, 2013)

dvl@ said:
			
		

> All my incoming MX are provided by Google.  They handle the incoming mail and forward to my private MX, and from there the mail for me goes into my ~/Maildir.
> 
> With the move to IMAP in a jail, I need to get the mail from my private MX into that jail.  All mail being sent to that jail will be destined for my ~/Maildir, with some massaging via procmail.


Now, the combination of Postfix and Dovecot is one of my personal favourites too, especially since you can relatively easy make Postfix share the same authentication scheme which Dovecot uses. Effectively providing one user name and password combination for both incoming and outgoing e-mail.

But in your case I think this isn't an issue at all since your outgoing e-mail is most likely handled by Google as well.

So if it's ease of use you're after why not stop using an MTA entirely? Unless of course you still need one to handle your private e-mail (the private MX records you mentioned).

But when it comes to e-mail from Google I wonder if a mail retrieval system couldn't be a liable option? Something in the likes of mail/fetchmail; a system which retrieves the e-mail from a remote location and then stores it in a local mail storage (an mbox or Maildir mailbox).


----------



## dvl@ (Oct 18, 2013)

ShelLuser said:
			
		

> So if it's ease of use you're after why not stop using an MTA entirely? Unless of course you still need one to handle your private e-mail (the private MX records you mentioned).



Because I need some way to get the mail into the IMAP server.



			
				ShelLuser said:
			
		

> But when it comes to e-mail from Google I wonder if a mail retrieval system couldn't be a liable option? Something in the likes of mail/fetchmail; a system which retrieves the e-mail from a remote location and then stores it in a local mail storage (an mbox or Maildir mailbox).



That's an old memory! It's been a long time since I used fetchmail.  I think I set it up for my mom when she was using Pine, many years ago.

No, I'd rather have a push system, then a pull system.


----------



## jrm@ (Oct 18, 2013)

ShelLuser said:
			
		

> But when it comes to e-mail from Google I wonder if a mail retrieval system couldn't be a liable option? Something in the likes of mail/fetchmail; a system which retrieves the e-mail from a remote location and then stores it in a local mail storage (an mbox or Maildir mailbox).



Except mail/fetchmail doesn't do that.  It treats old messages like they haven't been delivered, modifies headers and submits them to an MTA.

Here is an excerpt from a post by D.J. Bernstein on a qmail mailling list, 


> Last night, root@xxxxxxxxxxxxxxxxx reinjected thirty old messages from various authors to qmail@xxxxxxxxxxxxxx.  This sort of idiocy happens much more often than most subscribers know, thanks to a broken piece of software by Eric Raymond called fetchmail. Fortunately, qmail and ezmlm have loop-prevention mechanisms that stop these messages before they are distributed to subscribers. The messages end up bouncing to the wrong place, thanks to another fetchmail bug, but at least the mailing list is protected.



If you want a mail fetcher that retrieves e-mail from a remote location and stores it locally, try mail/getmail.


----------



## dvl@ (Oct 22, 2013)

For the record: I've decided to go with Postfix.  It runs on all my other mail servers.  I've also converted my Procmail scripts to Maildrop.


----------

