PowerMTA Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

PowerMTA 5.5r1 is out!!!!  Please contact support@port25.com for a license and download access.

Author Topic: 'mails' command not working  (Read 69785 times)

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
'mails' command not working
« on: September 17, 2012, 07:04:23 AM »

Hi,
I am running PMTA on my server and postfix is stopped there. When I try to deliver a mail using the 'mail' command, it's not delivered and instead it appears in 'maildrop' directory of postfix. 'pmtad'  is listening on all the interfaces/sub interfaces(0.0.0.0) including 127.0.0.1 . I use the following command to send mails --> /usr/bin/printf "%b" "test mail" | /bin/mail -s "test" someone@something.com . And, I could see these mails under /var/spool/postfix/maildrop  directory. This needs to be routed via pmta as Nagios uses the same command to send alerts.

Please help.
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: 'mails' command not working
« Reply #1 on: September 17, 2012, 08:47:51 AM »

Is PowerMTA ever getting the connection/message?  To troubleshoot, enable inbound logging in PowerMTA via "log-commands  yes" in the appropriate <source IP> definition, for example;

<source a.b.c.d>
     always-allow-relaying  yes
     log-commands   yes
</source>

replacing a.b.c.d with the IP of the machine running the bin command.  Remember to save the config and reload PowerMTA after making the change and before your test.  Then submit a message and see if anything goes into the PowerMTA log file.  If not, you are not communicating with PowerMTA.

Since Postfix is getting the messages, the odds are very high that Postfix is still running and getting the messages directly from the app, not PowerMTA.

Logged

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: 'mails' command not working
« Reply #2 on: September 17, 2012, 09:24:18 AM »

Hi,
I am not getting any response on the log file. The mail remains still in the postfix maildrop. The mail is as follows
"T^Q1347886981 388579A^Urewrite_context=localF^DrootS^DrootR^Xpriyans@sparksupport.comM^@N%Date: Mon, 17 Sep 2012 15:03:01 +0200N^\To: someone@something.comN^MSubject: testN'User-Agent: Heirloom mailx 12.4 7/29/08N^QMIME-Version: 1.0N*Content-Type: text/plain; charset=us-asciiN+Content-Transfer-Encoding: quoted-printableN^@N
test mail=X^@E^@"

And, postfix is stopped.
[root@bg logs]# postfix status
postfix/postfix-script: the Postfix mail system is not running


And, pmta is running.
#netstat -plant | grep :25
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      969/pmtad


Any idea on what would be causing problem?
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: 'mails' command not working
« Reply #3 on: September 17, 2012, 09:32:32 AM »

Does the application use SMTP?  That could simply be the problem.
 
Logged

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: 'mails' command not working
« Reply #4 on: September 17, 2012, 09:51:32 AM »

I am trying from the Terminal/Console. Can you please elaborate, what do you mean by using SMTP?
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: 'mails' command not working
« Reply #5 on: September 17, 2012, 09:57:04 AM »

Does this command use SMTP or some other interface when attempted to communicate with the mail server?

If PowerMTA responds when you use telnet, then the odds are very high that this application uses some other interface besides SMTP to submit mail, and thus why you have the issue.
Logged

tiadmin

  • Jr. Member
  • **
  • Karma: +1/-17
  • Posts: 44
Re: 'mails' command not working
« Reply #6 on: September 17, 2012, 10:35:11 AM »

No.. This is a basic linux/unix command - "mail" or "mailx" - used for system mailing. At this time, I am not using any applications but entering the command directly on linux console/terminal to send the mail. Pmta responds to the command "telnet 127.0.0.1 25". Let me see what I can do from my side  :)
Logged