prova
http://www.morganino.it/technology/inviare-mail-con-testo-ed-allegato-da-shell-linux/
altrenativa: usare ssmtp
config in: /etc/ssmtp/ssmtp.conf
[email protected]
mailhub=smtp.gmail.com:587
AuthUser=mygmailusername
AuthPass=mypassword
UseSTARTTLS=YES
- - - - - - - - - - - - - -
invio
ssmtp
[email protected] < msg.txt
grazie, ho letto!
ho installato il pacchetto sharutils che mi sarà utile...
però credo che il problema sia mail
ho quindi seguito questo sito http://forum.slicehost.com/index.php?p=/discussion/2338/my-guide-configure-centos-and-php-mail-to-use-google-apps-smtp-server/p1
per l'installazione di msmtp ed ho installato msmtp.. solo che non va...
perchè quando provo ad inviare una mail di test ottengo il seguente errore..
[oracle@centos etc]$ echo -e "Subject: Test Mail\r\r\r\n This is a mail test" | msmtp --debug --from=default -t
[email protected]]
loaded system configuration file /usr/local/etc/msmtprc
loaded user configuration file /home/oracle/.msmtprc
using account default from /home/oracle/.msmtprc
host = smtp.gmail.com
port = 587
timeout = off
protocol = smtp
domain = localhost
auth = LOGIN
user = [la mia
[email protected]]
password = *
ntlmdomain = (not set)
tls = on
tls_starttls = on
tls_trust_file = /etc/pki/tls/certs/ca-bundle.crt
tls_crl_file = (not set)
tls_fingerprint = (not set)
tls_key_file = (not set)
tls_cert_file = (not set)
tls_certcheck = on
tls_force_sslv3 = off
tls_min_dh_prime_bits = (not set)
tls_priorities = (not set)
auto_from = off
maildomain = (not set)
from = default
dsn_notify = (not set)
dsn_return = (not set)
keepbcc = off
logfile = /var/log/msmtp.log
syslog = (not set)
reading recipients from the command line and the mail
msmtp: cannot create socket: Address family not supported by protocol
msmtp: could not send mail (account default from /home/oracle/.msmtprc)
mentre quando invio una mail usando il modo classico mail -s "oggetto"
[email protected]
la mail mi viene notificata nel file /var/spool/mail/user
suggerimenti??