F
F
Fisab2016-02-07 02:46:48
gmail
Fisab, 2016-02-07 02:46:48

`mail(1)`: unable to send messages, how?

I put mailit on and I'm trying to send myself a letter to my mail:
mail -s "тема письма" [email protected] < log.txt
(substituted my nickname, log.txtyes).
But it doesn't show up in the mail. Just haven't tried it. I put postfix, poked around, and still the letters do not come, tell me what to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Brazhnikov, 2016-02-07
@Ilyabr

Run mail with no arguments and see if there are mails in the mailbox. If “chippers” arrive after each such dispatch, you need to look at what is written in them. I had something similar with Google mail, but there Google itself sent letters from [email protected] to spam.

V
Victor, 2016-02-07
@only-victor

1. Look at the /var/log/mail.log logs, everything is written in them what is happening with your letters.
2. Postfix settings must be configured correctly. Below is a list of minimum settings.
3. For gmail, you MUST configure dkim and spf. Once configured, all your emails are accepted by gmail. In the email headers you should find the lines Received-SPF: pass and dkim=pass - configured correctly.
To set up dkim you will need opendkim.
Here are the minimum postfix settings:
myhostname = YOUR_DOMAIN.COM
mydomain = YOUR_DOMAIN.COM
myorigin = $mydomain
inet_interfaces = all
mydestination =
mynetworks_style = host
mynetworks = 127.0.0.1/8
relay_domains = $mydestination
smtpd_milters = inet:127.0.0.1:8891 -- to connect to opendkim
// if ssl is needed
smtpd_tls_wrappermode = yes
smtpd_tls_CAfile = /etc/ssl/cacert.pem
smtpd_tls_cert_file = /etc/ssl/newcerts/server.pem
smtpd_tls_key_file = /etc/ ssl/private/server.pem
smtpd_tls_security_level=may
smtpd_tls_received_header=no
smtp_use_tls=yes

V
Vlad Zhivotnev, 2016-02-07
@inkvizitor68sl

https://debian.pro/1128 - configure ssmtp. Postfix/exim is not up to your level yet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question