<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sendmail to mailserver in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33853#M7112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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&lt;STRONG&gt; internal_sendmail&lt;/STRONG&gt;. I hope someome can confirm that internal_sendmail is&amp;nbsp;&lt;SPAN&gt;$FWDIR/bin/sendmail&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="66722" class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/66722_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2018 12:16:38 GMT</pubDate>
    <dc:creator>ED</dc:creator>
    <dc:date>2018-06-25T12:16:38Z</dc:date>
    <item>
      <title>sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33849#M7108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to test mail from sendmail to mailserver. Syntax used is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;./sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have used fwmonitor to capture output and opened it in Wireshark. It goes like this:&lt;/P&gt;&lt;P&gt;220&amp;nbsp; answer from mailserver&amp;nbsp;&lt;/P&gt;&lt;P&gt;HELO mgmt.mydomain.com&lt;/P&gt;&lt;P&gt;250 reply from mailserver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then it stops. The next thing should be something like this from sendmail&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MAIL FROM: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:me@mydomain.com"&gt;me@mydomain.com&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;but it never happens.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows why and if there is something wrong with the syntax used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 11:26:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33849#M7108</guid>
      <dc:creator>ED</dc:creator>
      <dc:date>2018-06-25T11:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33850#M7109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On security gateways I have used the following command in the past:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;echo -e "Subject: Mail test\r\n\r\nTest.\r\n" | sendmail --domain=example.com -f &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:no-reply@example.com"&gt;no-reply@example.com&lt;/A&gt;&lt;SPAN&gt; -v &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:user@example.com"&gt;user@example.com&lt;/A&gt;&lt;SPAN&gt; --host=&amp;lt;ipaddress_of_mta&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 11:54:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33850#M7109</guid>
      <dc:creator>Niels_van_Sluis</dc:creator>
      <dc:date>2018-06-25T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33851#M7110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/66721_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 12:03:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33851#M7110</guid>
      <dc:creator>ED</dc:creator>
      <dc:date>2018-06-25T12:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33852#M7111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On a R77.30 gateway there seems to be at least two versions of sendmail:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/usr/sbin/sendmail&lt;/LI&gt;&lt;LI&gt;$FWDIR/bin/sendmail&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one I was using is /usr/sbin/sendmail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 12:10:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33852#M7111</guid>
      <dc:creator>Niels_van_Sluis</dc:creator>
      <dc:date>2018-06-25T12:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33853#M7112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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&lt;STRONG&gt; internal_sendmail&lt;/STRONG&gt;. I hope someome can confirm that internal_sendmail is&amp;nbsp;&lt;SPAN&gt;$FWDIR/bin/sendmail&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="66722" class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/66722_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 12:16:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33853#M7112</guid>
      <dc:creator>ED</dc:creator>
      <dc:date>2018-06-25T12:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33854#M7113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The other one should work like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;echo "Test" | $FWDIR/bin&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;EM&gt;/sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS&lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 12:18:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33854#M7113</guid>
      <dc:creator>Niels_van_Sluis</dc:creator>
      <dc:date>2018-06-25T12:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33855#M7114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using echo I could send send mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution to my problem was to use&amp;nbsp;&lt;STRONG&gt;$FWDIR/bin/sendmail -s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;internal_sendmail&amp;nbsp;-s 'SmartView' -t MAILSERVER -f SENDER_EMAIL_ADDRESS RECEIVER_EMAIL_ADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the Global properties configuration.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 12:45:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/33855#M7114</guid>
      <dc:creator>ED</dc:creator>
      <dc:date>2018-06-25T12:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/96785#M19038</link>
      <description>&lt;P&gt;HI ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me how can I send an attachment over same email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have scheduled MDS backup and want to send a report when it is completed with logs files attached.&lt;/P&gt;&lt;P&gt;I am using below script to send email and using R80.30 OS&lt;/P&gt;&lt;P&gt;echo -e "Subject: Mail test\r\n\r\nTest.\r\n" | sendmail --domain=abc.com -f server@abc.com -v Receipient@abc.com --host=smtp.abc.com&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 11:02:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/96785#M19038</guid>
      <dc:creator>Ankit1990</dc:creator>
      <dc:date>2020-09-15T11:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/98230#M19221</link>
      <description>&lt;P&gt;Unfortunately, the sendmail client on the Check Point devices has been slimmed down and cannot have attachments. I ran into the same problem and this is something my SE told me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 15:25:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/98230#M19221</guid>
      <dc:creator>dlusk</dc:creator>
      <dc:date>2020-10-05T15:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail to mailserver</title>
      <link>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/179733#M30009</link>
      <description>&lt;P&gt;Python Script if you have to attach a file&lt;/P&gt;&lt;P&gt;___________&lt;/P&gt;&lt;P&gt;#! /usr/bin/python&lt;BR /&gt;import smtplib&lt;BR /&gt;from email.mime.multipart import MIMEMultipart&lt;BR /&gt;from email.mime.text import MIMEText&lt;BR /&gt;from email.mime.base import MIMEBase&lt;BR /&gt;from email import encoders&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;import argparse&lt;/P&gt;&lt;P&gt;parser = argparse.ArgumentParser(description="Send emails with attached files",&lt;BR /&gt;formatter_class=argparse.ArgumentDefaultsHelpFormatter,argument_default=argparse.SUPPRESS)&lt;BR /&gt;parser.add_argument("-s", "--smtp", help="Mailrelay IP",required=True)&lt;BR /&gt;parser.add_argument("-r", "--fromm", help="from",required=True)&lt;BR /&gt;parser.add_argument("-d", "--to", help="to",required=True)&lt;BR /&gt;parser.add_argument("-t", "--Subject", help="Subject",required=True)&lt;BR /&gt;parser.add_argument("-x", "--file", help="file to attacha",required=True)&lt;BR /&gt;args = parser.parse_args()&lt;/P&gt;&lt;P&gt;sender_email = args.fromm&lt;BR /&gt;receiver_email = args.to&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;message = MIMEMultipart()&lt;/P&gt;&lt;P&gt;message["From"] = args.fromm&lt;BR /&gt;message['To'] = args.to&lt;BR /&gt;message['Subject'] = args.Subject&lt;/P&gt;&lt;P&gt;file = args.file&lt;BR /&gt;attachment = open(file,'rb')&lt;/P&gt;&lt;P&gt;obj = MIMEBase('application','octet-stream')&lt;/P&gt;&lt;P&gt;obj.set_payload((attachment).read())&lt;BR /&gt;encoders.encode_base64(obj)&lt;BR /&gt;obj.add_header('Content-Disposition',"attachment; filename= "+file)&lt;/P&gt;&lt;P&gt;message.attach(obj)&lt;BR /&gt;my_message = message.as_string()&lt;/P&gt;&lt;P&gt;email_session = smtplib.SMTP(args.smtp,25)&lt;BR /&gt;email_session.starttls()&lt;/P&gt;&lt;P&gt;email_session.sendmail(sender_email,receiver_email,my_message)&lt;BR /&gt;email_session.quit()&lt;/P&gt;&lt;P&gt;___________&lt;/P&gt;&lt;P&gt;chmod&amp;nbsp; &amp;nbsp;+x&amp;nbsp;&amp;nbsp;mail.py&lt;/P&gt;&lt;P&gt;./mail.py -s x.x.x.x -r test@test.com -d&amp;nbsp; elpana@siva.com&amp;nbsp;-t "test email " -x file.csv&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 17:59:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/sendmail-to-mailserver/m-p/179733#M30009</guid>
      <dc:creator>Mantecoso</dc:creator>
      <dc:date>2023-05-02T17:59:07Z</dc:date>
    </item>
  </channel>
</rss>

