Solved [tor + fetchmail + MDA] mda return non zero status 126


New Member

Messages: 7


My email provider have create a tor access server.

I use daily fetchmail and procmail to get my email.

For Tor access I have modified my .fetchmailrc and changed to @dress.onion informations.
I start with commands :
torsocks fetchmail
But there is an error message :
mda returned non zero status 126

My MDA is procmail.

I have disable this line in my fechmailrc but it can't write emails in my local /var/mail/$username.
I think procmail is not execute because I have no procmail.log generate (my procmailrc is configure to write a verbose log)

When I launch the same commands in root account, all is ok.
In Arch Linux, I have tested the same and it's ok with my user account.

I don't understand why. I think that's a configuration problem. In my search I found in GNU/Linux system that this errors is often linked to SELinux.





Reaction score: 832
Messages: 1,761

When I launch the same commands in root account, all is ok.
I suppose this is a permission problem. I guess your user does not have rights to execute one of those programs torsocks or/and fetchmail, or do not have rights to write in the mail folder you set.

Take a look at Thread 39322.


New Member

Messages: 7

Thank you.

I have try maildrop, but I have a same errors
mda returned non zero status (75)

I have deleted mda line of my fetchmailrc
I have change permission of /var/mail/fredo.

There is a new error when I launch fetchmail :
Connection to a local address are denied since it might be a TCP DNS query to a local DNS server. Rejecting it for safety reasons. (in tsocks_connec() a connect.c:192)
fetchmail : Connection errors for this poll:
name 0: connection to localhost:smtp [] failed: Operation not permited.
fetchmail: SMTP connect to localhost failed
fetchmail: SMTP transaction error while fetchmail from @myemailaddress and delivering to SMTP host localhost.
reading message @myemailaddress:1 of 1 (5121 octets) fetchmail: Query status=10 (SMTP)
I have stop ipfw service and re-launch fetchmail. But there is the same error.

It's when I use torsocks only. In normal connection fetchmail & mda run. When I use torsocks with a browser, there is no error. I think there is something between torsocks and fetchmail end of process (local delivery)


Aspiring Daemon

Reaction score: 240
Messages: 667

Dear Fredo,
I am not 100% sure if this is related, but when I have switched from mail/procmail to mail/maildrop I have had to add
fetchmail: postmaster
to /etc/aliases. Then it needed to run cap_mkdb /etc/aliases or so to update the data base. The alias to postmaster has been configured to my account somewhere else in the same file. mail/procmail did not require that alias. This has been in combination with mail/postfix. May be it applies for your setup, too.


New Member

Messages: 7


I solved my problem.
I've installed dante proxy socks.
/usr/local/etc/socks.conf is configure for use TOR.

When I run :
socksify fetchmail
there is no error.

So it runs the way I wanted.

Thanks to you two.