This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem using email client from command line

Hello,

This is the "scenario".

I have a Vmware network on which a number of servers (Domain controllers, administrative management servers etc.) are virtualized.

Connected to this network are physical devices such as clients, printers etc.

The entire infrastructure is connected to a managed HUB.

Between the HUB and Internet is a Sophos XG Firewall (116w) and a DSL Modem provided by the provider.

So far all is okay and the clients navigate correctly and also send and receive e-mail.

A management application is installed on an administrative virtual server that uses a small program (blat.exe) to send emails with attachments.

The management application compiles a string and run it, e.g.

blat mail_body_message.txt -to destination@email.com -subject “Email Object” -attach attachment.pdf -f sender@sender_email.com - server server_smtp -u username -pw password

At this point the command is not executed correctly and in the log I find

2023.01.18 08:43:09 (Wed)------------Start of Session-----------------
Blat v3.0.0 w/GSS encryption (build : Feb 17 2012 17:46:41)
<<<getline<<< 220 SMTP ESMTP ready
>>>putline>>> EHLO cg-server.domain.it
<<<getline<<< 250-SMTP Hello cg-server.domain.lcl [192.168.1.110]
<<<getline<<< 250-SIZE
<<<getline<<< 250-8BITMIME
<<<getline<<< 250-PIPELINING
<<<getline<<< 250-PIPE_CONNECT
<<<getline<<< 250-CHUNKING
<<<getline<<< 250-STARTTLS
<<<getline<<< 250 HELP
Sending mail_body_message.txt  to destination@email.com
Subject: “Email Object”
Login name is sender@sender_email.com
>>>putline>>> MAIL FROM:<sender@sender_email.com>
<<<getline<<< 250 OK
>>>putline>>> RCPT TO:<destination@email.com>
<<<getline<<< 550 Relay not permitted
The SMTP server does not like the name destination@email.com.
Have you set the 'To:' field correctly, or do you need authorization (-u/-pw) ?
The SMTP server response was -> 550 Relay not permitted
>>>putline>>> QUIT
Error: Connection to server was dropped.
2023.01.18 08:43:11 (Wed)-------------End of Session------------------

To check if it is a firewall problem, I disconnected the Sophos XG and connected the network directly to the DSL modem.

Everything is working correctly.

Can I be helped to solve the problem?

Thank You and Best Regards.

Gaetano



This thread was automatically locked due to age.
Parents
  • Hello  ,

    Thanks for reaching out to Sophos Community and hope you are well. 

    thanks for the information provided

    Further queries:

    -Kindly respond to rfcat if you are using FW to pass email (MTA mode): If yes,

    -Is this working fine previously? If yes, are there any particular change that might happened and lead to this? (Firmware update, Policy change, Security Features configuration such as Web Filter, IPS, ATP etc. Also what is the current Firmware version of Sophos Firewall

    -Kindly check Host based relay (for outbound email traffic)
    - Check Mail logs for specific rejected mail and hover the mouse over status to see the reason. It will show “Relay not permitted for 192.168.1.110” host
    - Add/Update hosts/networks details in Host based relay via Email>Relay settings>Host based relay - if mail is rejected due to “550 Relay not permitted”.

    -Also, Is this a legitimate domain we see on logs? "destination@email.com" or only for example?

    If not,

    -Is this working fine previously? If yes, are there any particular change that might happened and lead to this? (Firmware update, Policy change, Security Features configuration such as Web Filter, IPS, ATP etc. 

    -Also are there any Logs from the Firewall side Log Viewer regarding traffic coming from that server? (Kindly check on logs - Firewall, Web Filter, IPS) and also if ATP is blocking traffic?

    Thank you for your time and patience and thank you for choosing Sophos

    Cheers,

    Raphael Alganes
    Community Support Engineer | Sophos Technical Support
    Sophos Support Videos Product Documentation  |  @SophosSupport  | Sign up for SMS Alerts
    If a post solves your question use the 'Verify Answer' link.

Reply
  • Hello  ,

    Thanks for reaching out to Sophos Community and hope you are well. 

    thanks for the information provided

    Further queries:

    -Kindly respond to rfcat if you are using FW to pass email (MTA mode): If yes,

    -Is this working fine previously? If yes, are there any particular change that might happened and lead to this? (Firmware update, Policy change, Security Features configuration such as Web Filter, IPS, ATP etc. Also what is the current Firmware version of Sophos Firewall

    -Kindly check Host based relay (for outbound email traffic)
    - Check Mail logs for specific rejected mail and hover the mouse over status to see the reason. It will show “Relay not permitted for 192.168.1.110” host
    - Add/Update hosts/networks details in Host based relay via Email>Relay settings>Host based relay - if mail is rejected due to “550 Relay not permitted”.

    -Also, Is this a legitimate domain we see on logs? "destination@email.com" or only for example?

    If not,

    -Is this working fine previously? If yes, are there any particular change that might happened and lead to this? (Firmware update, Policy change, Security Features configuration such as Web Filter, IPS, ATP etc. 

    -Also are there any Logs from the Firewall side Log Viewer regarding traffic coming from that server? (Kindly check on logs - Firewall, Web Filter, IPS) and also if ATP is blocking traffic?

    Thank you for your time and patience and thank you for choosing Sophos

    Cheers,

    Raphael Alganes
    Community Support Engineer | Sophos Technical Support
    Sophos Support Videos Product Documentation  |  @SophosSupport  | Sign up for SMS Alerts
    If a post solves your question use the 'Verify Answer' link.

Children