[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] How can "msmtp" send emails via host proxy?



Hi Matus,

Firstly, thanks very much for your answer!

I download and update the newest msmtp(v1.6.2), and update the .msmtprc configure file
(Add proxy and logfile):

tls on
tls_certcheck off
host smtp.gmail.com
port 587
proxy_host xxxxxxxx.com
proxy_port 8080
from xxxxxx@...20...
user xxxxxx
password xxxxxxxx
auth on
logfile -
timeout 45

Then I retry msmtp command, and the final error is like this:

msmtp: network read error: the operation timed out
msmtp: could not send mail (account default from /root/.msmtprc)
Aug 20 04:45:56 host=smtp.gmail.com tls=on auth=on user=xxxxxx from=xxxxxx@...20... recipients=xxxxxx@...415... errormsg='network read error: the operation timed out' exitcode=EX_IOERR

From the capture packet, it seems the after establishing TCP connection, the msmtp
will not send the content.

The attachment is the capture packet.

If possible, could you help me to check it? Thanks very much in advance!


Best Regards
Nan Xiao

On Thu, Aug 20, 2015 at 3:03 PM, Matus UHLAR - fantomas <uhlar@...186...> wrote:
On 20.08.15 11:04, Nan Xiao wrote:
>My computer needs to use proxy to access the website, but I don't know how
>can let "msmtp"
>to use proxy.

msmtp since 1.6.0 supports SOCKS proxy.

>and I have set proxies in the environment variables:
>export http_proxy="http://xxxxxxxx.com:8080/"
>export https_proxy="https://xxxxxxxx.com:8080/"

Why should you use HTTP proxy for connecting to SMTP server?
Does even your HTTP proxy allow connecting to SMTP (and let you send spam
through the proxy)?

>>From the capture packet:
>22:59:13.614187 IP (tos 0x0, ttl 64, id 41982, offset 0, flags [DF], proto
>TCP (6), length 60)
>    xx.xx.xx.xx.40999 > 64.233.178.109.submission: Flags [S], cksum 0xf96a
>(incorrect -> 0x50ed), seq 157522949,
>
>I can see the  "msmtp" send email to gmail server directly, not via the
>proxy. So how can "msmtp" send
>email via host proxy?

Can you connect directly?

--
Matus UHLAR - fantomas, uhlar@...186... ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Spam = (S)tupid (P)eople's (A)dvertising (M)ethod

------------------------------------------------------------------------------
_______________________________________________
msmtp-users mailing list
msmtp-users@...237...ceforge.net
https://lists.sourceforge.net/lists/listinfo/msmtp-users

Attachment: msmtp_proxy.pcap
Description: Binary data