cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
ED
Silver

sendmail to mailserver

Hi,

Trying to test mail from sendmail to mailserver. Syntax used is 

./sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS

I have used fwmonitor to capture output and opened it in Wireshark. It goes like this:

220  answer from mailserver 

HELO mgmt.mydomain.com

250 reply from mailserver

And then it stops. The next thing should be something like this from sendmail

MAIL FROM: me@mydomain.com but it never happens.

Anyone knows why and if there is something wrong with the syntax used?

Tags (1)
6 Replies

Re: sendmail to mailserver

On security gateways I have used the following command in the past:

echo -e "Subject: Mail test\r\n\r\nTest.\r\n" | sendmail --domain=example.com -f no-reply@example.com -v user@example.com --host=<ipaddress_of_mta>

0 Kudos
ED
Silver

Re: sendmail to mailserver

Thank you Niels but this is sendmail from a management server r80.10 and it looks like it doesn't support the parameters you are using:

0 Kudos

Re: sendmail to mailserver

On a R77.30 gateway there seems to be at least two versions of sendmail:

  • /usr/sbin/sendmail
  • $FWDIR/bin/sendmail

The one I was using is /usr/sbin/sendmail.

0 Kudos
ED
Silver

Re: sendmail to mailserver

You are correct, there are two. The one I was trying was $FWDIR/bin/sendmail since I'm trying to run a mail alert script and are supposed to use internal_sendmail. I hope someome can confirm that internal_sendmail is $FWDIR/bin/sendmail

0 Kudos
Highlighted

Re: sendmail to mailserver

The other one should work like this:

echo "Test" | $FWDIR/bin/sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS

0 Kudos
ED
Silver

Re: sendmail to mailserver

When using echo I could send send mail.

Solution to my problem was to use $FWDIR/bin/sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS

instead of 

internal_sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS

in the Global properties configuration.