Fetchmail & smtphost

thn80

New Member
Hello,

I have two questions about Fetchmail when forwarding received (IMAP) mails via 'smtphost' to another server.
1) Is it required to have an MTA (e.g. Postfix) installed on the system to make Fetchmail able to use smtphost or is Fetchmail able to do this on its own?
2) How will Fetchmail behave in case the smpthost is (temporarly) not available? Will it buffer the mails or will it simply not retrieve the mails via IMAP/POP3 until the smtphost is available again?

Thanks a lot in advance,

Thomas
 
Fetchmail works in as a MUA (Mail User Agent) on one end and as MTA (Mail Transfer Agent) talking to your own MTA (Postfix) or an MDA (e.g. procmail) on the other.
Differently said, it fetches emails e.g. via IMAP and pushes them to an SMTP server, behaving as if it was a relay in the SMTP chain. This means that neither fetchmail nor the IMAP server nor the SMTP server have to operational 24/7 for this relay to work. It just has to work sufficiently often for your use case.

In the non-daemon mode it only runs until all emails are synchronized and then quits, in daemon mode it tries to synch emails continuously. You can just run it in a while-loop with daemon mode to catch any exceptions, but don't forget to add a sleep to reduce the impact of a failed server =)

1) Is it required to have an MTA (e.g. Postfix) installed on the system to make Fetchmail able to use smtphost or is Fetchmail able to do this on its own?
You need to push to an MTA or MDA. Fetchmail is no mail server in it's own, just a forwarding agent.

How will Fetchmail behave in case the smpthost is (temporarly) not available? Will it buffer the mails or will it simply not retrieve the mails via
Fetchmail works as a message queue system. It pulls the email from the IMAP server, tries to write it to SMTP. If this fails, it aborts the copy and it remains on the original server. Fetchmail does not have an actual local copy.
Note that you can change this behaviour at will, including keeping the original copy indefinitely.
 
Back
Top