Asking for help, contributing to the project

February 21, 2024 by Roberto Puzzanghera 24 comments

This short guide helped a number of people, also newbies in some cases, to successfully install a mail server based on qmail.

In case the informations published here are not sufficiently clear and exhaustive, if you want to address me a comment, an hint or a criticism, don't hesitate to post a comment or to contact me via email!

Anyway, if you don't want to take the trouble to read all the documentation and do it by yourself, because you don't have the time, or you need help concerning the qmail world or even if you want to migrate qmail/vpopmail to postfix and you don't know how to do it, I can offer a consulting service.

How to contribute to the project

Days ago a qmail guru wrote to me appreciating my contribution for <<keeping the spirit of qmail high>>. Besides having given me particular pleasure, I think it is a good slogan of what this space has become over the years, above all thanks to your contribution.

In addition to contributing in terms of testing, bug fixing and sharing your code, if you care about the project and want to preserve it, you can use the donate button below to reduce the maintenance costs of my server, which doesn't host any commercial product.

If you have a server available, I am also looking for a partnership to exchange the secondary DNS service.

Comments

delivery xx: success: client_connect:_connect_failed:_2/ did_0+0+1/

Hello,

Old qmail user I'm getting stuck on an issue I've never seen before.
Since last night I'm getting empty mail just with header and in qmail/current I get the following error

delivery xx: success: client_connect:_connect_failed:_2/ did_0+0+1/

 For information this just happen for incoming mails  (the ones generated locally are correctly delivered.
I tried to recompile vpopmail and qmail with latests releases, regenerating the keys but nothing resolve the issue .. .

Has anybody encountered this kind of issue ? 

Regards

Nicolas

Reply |

delivery xx: success: client_connect:_connect_failed:_2/ did_0+0+1/

Hello,

which qmail and vpopmail are using? which vpopmail driver? which delivery agent and which driver to connect to vpopmail?

Reply |

delivery xx: success: client_connect:_connect_failed:_2/ did_0+0+1/

Hello I continue looking around and I found that spamassassin was the root cause of my issue ... when I set it to no in simscan, it's okay when set to yes I have my issue ...
what misled me is that usually when having issue in simscan chain ... I have no mail at all, but there getting empty ones. I need to review all spamassassin install ... 

Reply |

Still not email incomming and Submission issue

Hello Roberto,

Love your configuration of qmail as I have used used it serveral times to correct issues.

I am still havning issue with the SMTP not delivering MAIL and the 587 Not reading config files.

Have looked through all the information on you web site and nothing.

Here is the SMTP log inforamtion .

2023-08-21 10:43:07.531089012 tcpserver: status: 1/200
2023-08-21 10:43:07.531378713 tcpserver: pid 4742 from 87.120.84.182
2023-08-21 10:43:07.531814235 tcpserver: ok 4742 ns2.bestek.ca:184.70.70.142:25 :87.120.84.182::50339
2023-08-21 10:43:22.392468556 GREETDELAY from 87.120.84.182: client disconnected
2023-08-21 10:43:22.393249471 tcpserver: end 4742 status 256
2023-08-21 10:43:22.393261122 tcpserver: status: 0/200
2023-08-21 10:43:32.111965490 tcpserver: status: 1/200
2023-08-21 10:43:32.112220098 tcpserver: pid 5032 from 209.85.215.170
2023-08-21 10:43:32.273800718 tcpserver: ok 5032 ns2.bestek.ca:184.70.70.142:25 mail-pg1-f170.google.com:209.85.215.170::55524
2023-08-21 10:43:52.674290324 CHKUSER accepted sender: from <sender@gmail.com|remoteinfo/auth:|chkuser-identify:> remote <helo:|remotehostname:mail-pg1-f170.google.com|remotehostip:209.85.215.170> rcpt <> : sender accepted
2023-08-21 10:43:52.828942010 CHKUSER accepted rcpt: from <sender@gmail.com|remoteinfo/auth:|chkuser-identify:> remote <helo:|remotehostname:mail-pg1-f170.google.com|remotehostip:209.85.215.170> rcpt <user@bestek.ab.ca> : found existing recipient
2023-08-21 10:43:52.915884424 qmail-smtpd[5032]: rbl: ip=209.85.215.170 query=170.215.85.209.b.barracudacentral.org result=ignore message=''
2023-08-21 10:43:52.980217722 qmail-smtpd[5032]: rbl: ip=209.85.215.170 query=170.215.85.209.zen.spamhaus.org result=ignore message=''
2023-08-21 10:43:53.039195775 qmail-smtpd[5032]: rbl: ip=209.85.215.170 query=170.215.85.209.psbl.surriel.com result=ignore message=''
2023-08-21 10:43:53.076350166 qmail-smtpd[5032]: rbl: ip=209.85.215.170 query=170.215.85.209.bl.smapcom.net result=ignore message=''
2023-08-21 10:43:53.077564664 policy_check: remote sender@gmail.com -> local user@bestek.ab.ca (UNAUTHENTICATED SENDER)
2023-08-21 10:43:53.077593938 policy_check: policy allows transmission
2023-08-21 10:43:53.077632584 qlogenvelope: result=accepted code=250 reason=rcptto detail=chkuser helo=mail-pg1-f170.google.com mailfrom=sender@gmail.com rcptto=user@bestek.ab.ca relay=no rcpthosts=yes size= authuser= authtype= encrypted=tls sslverified=no localip=184.70.70.142 localport=25 remoteip=209.85.215.170 remoteport=55524 remotehost=mail-pg1-f170.google.com qp= pid=5032
2023-08-21 10:43:53.173581258 qlogreceived: result=accepted code=250 reason=queueaccept detail= helo=mail-pg1-f170.google.com mailfrom=sender@gmail.com rcptto=user@bestek.ab.ca relay=no rcpthosts= size=2688 authuser= authtype= encrypted=tls sslverified=no localip=184.70.70.142 localport=25 remoteip=209.85.215.170 remoteport=55524 remotehost=mail-pg1-f170.google.com qp=5287 pid=5032
2023-08-21 10:43:53.210272545 tcpserver: end 5032 status 0
2023-08-21 10:43:53.210299913 tcpserver: status: 0/200

Here is the Submission Log

2023-08-21 10:28:57.524940837 tcpserver: status: 1/200
2023-08-21 10:28:57.525161839 tcpserver: pid 26799 from 75.152.104.10
2023-08-21 10:28:57.525862776 tcpserver: ok 26799 ns2.bestek.ca:184.70.70.142:587 s75-152-104-10.ab.hsia.telus.net:75.152.104.10::51610
2023-08-21 10:28:57.533993887 qlogenvelope: result=rejected code=421 reason=cannot_read_controls detail= helo= mailfrom= rcptto= relay=no rcpthosts= size= authuser= authtype= encrypted= sslverified=no localip=184.70.70.142 localport=587 remoteip=75.152.104.10 remoteport=51610 remotehost=s75-152-104-10.ab.hsia.telus.net qp= pid=
2023-08-21 10:28:57.534331139 tcpserver: end 26799 status 256
2023-08-21 10:28:57.534341532 tcpserver: status: 0/200

Any hints would be fantastic as I have been unable to get mail for over a week now.

Reply |

Still not email incomming and Submission issue

Can you show also the qmail send? Are you using dovecot LDA? If yes post LDA log as well

Reply |

Still not email incomming and Submission issue

Can you do an strace with submission service and send it via mail?

Reply |

tcp.submission is not able to be read

Hello

Just had qmail stop recognizing the postgresql 7.4 database so I rebuilt it to use version 11 of postgresql. The Dovecot reads the database and many of the vadddomain and vdominfo all pull from the database and it is able to do many thing ( are issues with missing tables but that is another issue)

Have netqmail-1.06 and vpopmail 5.4.33 and have applies your patches as per the instructions on the website.

I am able to get to the mail server and see the mail but the system rejects all emails that are in the database.

when I attempt to telnet into the 587 port i get error 421 unable to read control files which I have narrowed down to the tcp.sumbission file. it is setup with your configuration and it just fails.

Escape character is '^]'.
421 unable to read controls (#4.3.0)
Connection closed by foreign host.

Since this is failing to execute the file I am assuming the incomming mail is also unable to read the tcp.smtp.cdb file which is why the may is not being found. 

Any suggestions or direction would be greatly appreciated as I have built this many times and have been down for a week.

Thanks

Kenneth

Reply |

tcp.submission is not able to be read

I'm out of home now and cannot do researches. I would try to see what it cannot find with strace. 

Have a look here

https://notes.sagredo.eu/en/qmail-notes-185/testing-qmail-smtp-and-auth-22.html#comment2874 

Just guessing: did you enable qmail-spp and forgot to create the smtpplugins file?

Reply |

how to install DKIM ?

Hello, Roberto.
I want to install DKIM to my server.
But I can't it.

# tar xvfz netqmail-1.06.tar.gz
# cd netqmail-1.06
# patch < ../roberto-netqmail-1.06.patch-latest
# make
# make setup check

after try

# dknewkey -d domain.tld -t rsa -b 2048 default

but "dknewkey: command not found".

I find "The dknewkey shipped by the dkim patch itself" in your instructions.

How to install function of "libdomainkeys" ?

Reply |

how to install DKIM ?

Hi, assuming that you are using the latest patch, did you get any error during the patch and compilation process?

Reply |

how to install DKIM ?

Hello, Roberto. thank you for reply.

I resolve this problem, its bigenners mistake.

I can do it using  this command ”/var/qmail/bin/dknewkey",.

I make new path # export PATH="$PATH:/var/qmail/bin".

Now I can use command "# dknewkey ~ ".

My environment is AlmaLinux release 8.7.

Thank you.

Reply |

qmail-smtpd: read failed (hang up before quit cmd)

I get hundrets of errors like in the subject:

2021-03-08 12:00:40.257530500 policy_check: remote someone@somedomain.tld -> local user@lokaldomain.com (UNAUTHENTICATED SENDER)
2021-03-08 12:00:40.257532500 qlogenvelope: result=accepted code=250 reason=rcptto detail=chkuser helo=utm.mydomain.com mailfrom=someone@somedomain.tld rcptto=user@lokaldomain.com relay=no rcpthosts=yes size= authuser= authtype= encrypted= sslverified=no localip=xxx.xxx.xxx.xxx localport=25 remoteip=yyy.yyy.yyy.yyy remoteport=57288 remotehost= qp= pid=61565
2021-03-08 12:00:40.257926500 qmail-smtpd: read failed (hang up before quit cmd): someone@somedomain.tld from yyy.yyy.yyy.yyy to edmund.vankann@gut-ev.de helo utm.mydomain.com
2021-03-08 12:00:40.258775500 CHKUSER accepted rcpt: from <someone@somedomain.tld|remoteinfo/auth:|chkuser-identify:> remote <helo:utm.mydomain.com|remotehostname:unknown|remotehostip:yyy.yyy.yyy.yyy> rcpt <user@lokaldomain.com> : found existing recipient
2021-03-08 12:00:40.258778500 policy_check: remote someone@somedomain.tld -> local user@lokaldomain.com (UNAUTHENTICATED SENDER)
2021-03-08 12:00:40.258780500 qlogenvelope: result=accepted code=250 reason=rcptto detail=chkuser helo=utm.mydomain.com mailfrom=someone@somedomain.tld rcptto=user@lokaldomain.com relay=no rcpthosts=yes size= authuser= authtype= encrypted= sslverified=no localip=xxx.xxx.xxx.xxx localport=25 remoteip=yyy.yyy.yyy.yyy remoteport=57284 remotehost= qp= pid=61564
2021-03-08 12:00:40.259192500 qmail-smtpd: read failed (hang up before quit cmd): someone@somedomain.tld from yyy.yyy.yyy.yyy to user@lokaldomain.com helo utm.mydomain.com
2021-03-08 12:00:40.260162500 qmail-smtpd: read failed (hang up before quit cmd): someone@somedomain.tld from yyy.yyy.yyy.yyy to user@lokaldomain.com helo utm.mydomain.comMX-Record in DNS points to IP yyy.yyy.yyy.yyy, a UTM (securepoint), which acts as kind of a mailrelay and which performs checks like SPF, GreetDelay, Virusscanning etc. and mailfiltering based on local rules on the UTM.

One of the checks is to ask qmail server xxx.xxx.xxx.xxx via smtp if the mailbox (here: user@localdomain.com) exists, and if so and all checks are passed, the mail is delivered to qmail via smtp.

So, whats in the log is the communication between UTM (yyy.yyy.yyy.yyy) and qmail (xxx.xxx.xxx.xxx)

There are a lot of lines with "read failed" in the send-log and the mail isn't delivered to the mailbox. I searched the net for this error, but can't find anything.

I'm running other qmail-servers (rather old ones, based on Bill's Linux Qmail Toaster v 0.9.4), there are no such problems; communication between UTM and qmailservers is the same for all servers.

Any idea?

Reply |

qmail-smtpd: read failed (hang up before quit cmd)

Times ago I did a check and realized that messages from these IPs are regularly delivered. I think they violate the smtp protocol in some way (they close the connection before the final quit).

I don't think this is an error of your MTA and it wouldn't even logged in vanilla qmail

Reply |

bounce queue too long

I got this bounce:

<user@domain.com>:
CNAME lookup failed temporarily. (#4.4.3)
I'm not going to try again; this message has been in the queue too long.

any idea?

Reply |

bounce queue too long

DNS records are wrong or not set up correctly or inaccessible, or your server is trying to retrieve ANY dns records, which produces a very large response from the DNS that may overflow your response buffer. In this case the any-to-cname patch would help. Are you using my combined patch?

Reply |

DKIM on Qmail

Hi,

I have qmail running on CentOS 7.x. It was installed per Life With Qmail. It is working fine.

I need to add DKIM.

I assumed that I could simply add the dkim-netqmail-1.06 patch on top of the patches I initially added (qmail-1.03.errno.patch
qmail-1.03.qmail_local.patch
qmail-0.0.0.0.patch
qmail-1.03.qmtpd-netstring.patch
qmail-103.patch)

When I did that I got the following errors:

Hunk #2 FAILED at 18.
Hunk #3 FAILED at 42.
Hunk #4 FAILED at 63.
3 out of 4 hunks FAILED -- saving rejects to file dns.c.rej

Hunk #1 FAILED at 23.
Hunk #2 succeeded at 35 (offset -11 lines).
Hunk #3 succeeded at 83 (offset -11 lines).
Hunk #4 succeeded at 109 (offset -11 lines).
Hunk #5 succeeded at 129 (offset -11 lines).
1 out of 5 hunks FAILED -- saving rejects to file qmail.c.rej

Hunk #3 FAILED at 73.
Hunk #5 succeeded at 171 with fuzz 2.
1 out of 8 hunks FAILED -- saving rejects to file qmail-pop3d.c.rej

Hunk #3 FAILED at 66.
1 out of 4 hunks FAILED -- saving rejects to file qmail-popup.c.rej

I went ahead and ran make, and got this:

make
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load
chmod 755 make-load
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
./find-systype > systype
( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
chmod 755 load
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
compile
chmod 755 compile
( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null \
2>&1 \
&& cat fork.h2 || cat fork.h1 ) > fork.h
rm -f tryvfork.o tryvfork
./compile qmail-local.c
./compile qmail.c
qmail.c: In function ‘qmail_open’:
qmail.c:38:13: error: ‘pic’ undeclared (first use in this function)
qq->fdc = pic[0]; close(pic[1]);
^
qmail.c:38:13: note: each undeclared identifier is reported only once for each function it appears in
make: *** [qmail.o] Error 1

Clearly I am not doing something correctly. Do I need to simply start over? Eliminate one or more of the other patches? Something else?

I am grateful for any ideas.

Thorpe

Reply |

DKIM on Qmail

Hi, the DKIM patch is intended to be applied over a fresh netqmail. In this case, before compiling, you have to open those .rej files, look what went wrong during the patch process and then manually correct the source.

Edit: Perhaps it could be easier to apply DKIM firstly, and then add all the other extra patches not included already in netqmail

Reply |

DKIM on Qmail

Hi Roberto,

Thank you for the reply and insights. 

I have DKIM working, which turned out to be simpler than I was making it. 

Thank you.

Thorpe

Reply |

Qmail Alias

Hello,

i installed qmail with your tutorial and everything ist working fine exept of the aliases.

I want that when i write an Email to an adress that qmail triggers a script which i run with an command in the alias:

|/path/to/the/script/script.sh&

But that doesn't work. Can you help me?

kind regards

Tim

Reply |

Qmail Alias

Hi, I suppose you are inserting that line in your .qmail files... what error do you get?

Reply |

Adding qmail to supervisord

Hi,

I am trying to dockerize qmail.

Installling daemontools kills the container(send sig hup 1 which kills init script) + it tries to change innittab. I tried commenting out that part. Compiled qmail and related services + patch. But. now I am having issue adding this to supervirsord.I tried adding all running services related to qmail from a working installation but looks I am doing this wrong:

----

018-05-26 15:31:09,785 INFO exited: qmail-pop3d (exit status 126; not expected) 2018-05-26 15:31:09,786 INFO exited: tcpserver-smtpd (exit status 111; not expected) 2018-05-26 15:31:09,787 INFO exited: qmail-smtpd (exit status 126; not expected)

--

I am getting this for al except svscan and svscanboot.

Reply |

Adding qmail to supervisord

Sorry, I'm not familiar with supervisord

Reply |

mail not delivered in mailbox follow up

after looking in my send log i see failure:

Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/ 

but the mailbox is there.

it looks like it can not find my mailbox what could be wrong in the configuration.

Reply |

mail not delivered in mailbox follow up

Hi, you should provide more details... at least the complete qmail-send log

Are you strictly following my guide? Which lda are you using? dovecot or vpopmail?

And since I received a lot of messages about the missing log@domain mailbox, sorry if I ask, but are you sure that the missing mailbox is the recipient and not the log@yourdomain?

Reply |

Add a comment

Recent comments
Recent posts

RSS feeds