mail or mailx does not seem to be working. When checking postfix logs, it does not seem to be hitting postfix. Is there some setting that needs to be done? I just wanted to get the logwatch emails. Postfix is working fine. Tried the following. mail -s testing [email protected] mailx -s testing [email protected] Debian 12 ispconfig 3.2.11 Installed using the script from https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/
Is the mail even arriving at the destination when sending it with the mail command? Can you test it like this: Code: echo "Test Mail Body" | mail -s "Subject Test" [email protected]
Just tried the the following. Code: echo "Test Mail Body" | mail -s "Subject Test" [email protected] Unfortunately did not receive the email. Checked postfix logs and there is no activity from mail. Seems like mail is not contacting postfix Is there some setting like altenative smtp to be setup? Or connect mail to postfix?
Can you try using the sendmail binary directly? Code: /usr/sbin/sendmail [email protected] To: [email protected] From: [email protected] Subject: Test Mail Test (CTRL + D to send) Be aware that in the maillog the from is the username with which you are logged in to the box and the domain is the hostname so for example [email protected] or [email protected]. You will see something like this from the sending side: Code: Sep 13 10:54:28 mail01 postfix/pickup[3923452]: E9935E0102: uid=1000 from=<username> Sep 13 10:54:28 mail01 postfix/cleanup[3972660]: E9935E0102: message-id=<[email protected]>
Unfortunately no error. Did the following. 1. deleted all in the mail queue. (still setting up so no important emails) 2. did "mail -s Testing [email protected]" 3. the email appears in the mailq 4. postfix is not picking it up. It just stays in the mailq 5. used thunderbird to send email using smtp and it works. seems like a postfix config issue with local mail. Anything I can check in the config?
Tried with sendmail as mentioned, the email gets into the mailq but postfix does not pickup. Could it be some service is not up? When trying to flush the mailq, got the following error. # postfix flush postqueue: fatal: Cannot flush mail queue - mail system is down
I think this is the problem. Not sure if it is the correct thing to do. In the /etc/postfix/master.cf the pickup line is commented out. Code: #628 inet n - y - - qmqpd pickup unix n - y 60 1 pickup <--------- this one cleanup unix n - y - 0 cleanup qmgr unix n - n 300 1 qmgr #qmgr unix n - n 300 1 oqmgr tlsmgr unix - - y 1000? 1 tlsmgr rewrite unix - - y - - trivial-rewrite bounce unix - - y - 0 bounce defer unix - - y - 0 bounce trace unix - - y - 0 bounce verify unix - - y - 1 verify flush unix n - y 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - y - - smtp Commentated it and it seems to be working. Safe to do that?
Pickup should be enabled, and it is enabled by default in Debian 12 when you install Debian from official Debian 12 install media. Most likely, the person who built your Debian base image must have disabled it manually.
As you see in my example log, when sending with the mail command you need pickup to be enabled for it to work properly.