fetchmail deleted emailsl from server, empty mbox.

Hi everyone.
I set up fetchmail with yast for my first time, and fetchmail downloaded my email from the (ISP’s) server and deleted them from that server.

/var/log/fetchmail says it downloaded 1223 emails

I can’t find them on the local machine:
/var/mail/adam contained a single error mail which has moved since I read it with rmail
/var/spool/mail/adam is an empty file.
/var/spool/postfix/defer/ has a bunch of files under it.

Please can someone either: a) suggest how to view the messages, (prefer emacs rmail but open to alternatives).
or: b) refer me to a high level technical guide on how fetchmail / postfix / etc work together on suse?

Thanks all for your participation in the forum whether or not you can help me, it makes a difference in the world.

I’ve personally only used fetchmail for downloading email from another server to my server, maybe it’s possible or even required for some email clients but I can’t remember doing that personally.

So,
I don’t know about your current email (I hope you have good backups or an alternate source for those messages, or take steps <now> to make sure they’re not lost if they aren’t already).

Instead of just running fetchmail, I’d recommend you instead start with whatever email client you prefer to use (or not use. You can go “old school” and read raw files with a terminal if you wish but who really wants to do that?), then follow the guidelines for setting it up. Fetchmail <may> be used but probably with some integration steps. Most email clients I’ve used for the past 15+ years though come with their own internal way of downloading email and generally relate to the method used to store and view (eg POP3 vs IMAP)

TSU

I’ve personally only used fetchmail for downloading email from another server to my server,…

But where does fetchmail put the downloaded email (by default when configured with yast)?

Probably hands them over to postfix, who puts them in a mailbox in /var/spool/mail when all went well.

I have:

FETCHMAIL_SILENT="no"
FETCHMAIL_EXPERT_OPTIONS="-vv"

in my /etc/sysconfig/fetchmail.

That way fetchmail logs SMTP/POP3 protocol conversation as well as other info.

My /var/log/fetchmail indicates the downloaded e-mails are being flushed to localhost:25:

fetchmail: Trying to connect to ::1/25...connected.
...[snip SMTP-conversation]
fetchmail: forwarding to localhost
...[snip SMTP-conversation]
fetchmail:  flushed

So, postfix picks them up. Perhaps that happened to you too.

You might want to inspect postfix’s logs around the time you downloaded those e-mails:

journalctl -u postfix

See “man journalctl” for more options, especially the option --since.

It might just be that the mails are still in postfix’s queue, perhaps

postqueue -p

reveils something.

If postfix’s queue is not empty, you might want to backup /var/spool/postfix first (better be safe that sorry). And there is probably a reason as to why the mails were not delivered to your local mailbox. That would be in postfix’s logs (see above).

Hope this helps you somehow.

Kind regards,

Leen

Use the following commands to display actions:

Fetchmail contacts your mail server:

journalctl -b -u fetchmail

It hands mail over to postfix:

journalctl -b -u postfix

Postfix puts the mail into the home mailbox:

erlangen:~ # postconf home_mailbox
home_mailbox = .local/share/local-mail/inbox/
erlangen:~ # 

see also: https://forums.opensuse.org/showthread.php/528329-Postfix-SMTP-error