Hello, it s me again… Advancing on my configuration
all the DNS thingy seems ok now…
I can receive and send email.
So now, I try to send email from my other vps, in the same domain, that hosts the website, nextcloud, and later a mailing list. (nextcloud, set up in smtp, with the good parameter, sends email ok )
when I do the command : echo "relay test" | mail -s "relay test" destinationuser@destinationdomain
i get in the log : (/var/log/mail.log)
from=<user@hostname>
Why is the mail is from user@hostname and not the one in the file set up in /etc/postfix/relay_password
it seems that s slowing email and setting it up as a spam. some server even decline it.
thanks for your help !
This is because you are sending via CLI (also, as you noticed whoever you sent the mail as plus the hostname). As @alento has pointed out, if you use -r.
Example:
echo "relay test" | mail -s "relay test" -r 'First Last <you@example.com>' destinationuser@destinationdomain
This will set the “From:” address (to resolve the issue) and also the “Envelope name” (IE what would display in the client.)
OK if I use the -r, the from is OK @alento : I sent you 2 tests email.
Yes I installed postfix as in this guide https://mailinabox.email/advanced-configuration.html
you I leave the default config, and jsut add the 7 lines ?
or empty the default config file and just have the 7 lines in it ?
I have my other mail at neomaibox service. it seem s they are delaying mail coming for my box :
Aug 23 15:57:39 nuage postfix/smtp[5450]: 8011717C4D3: Server certificate not verified
Aug 23 15:57:39 nuage postfix/smtp[5450]: server certificate verification failed for mail2.neomailbox.net[5.148.176.58]:25: certificate has expired
Aug 23 15:57:39 nuage postfix/smtp[5450]: 8011717C4D3: to=<xxx@xxx.xx>, relay=mail2.neomailbox.net[5.148.176.58]:25, delay=80198, delays=80197/0.03/1.2/0, dsn=4.7.5, status=deferred (Server certificate not trusted)
Mail sent to the gmail adress are marked as spam, how can I solve that ?
DNNSEC is activated for this domain…
I guess it is not related to relaying anymore, let me know if you prefer me to open an another topic
Thank you for your help !!!