Answer the question
In order to leave comments, you need to log in
Linux mailers?
There is a list of hundreds of names and emails, you need to send a templated text (not spam) to them. Is there a working Linux tool that connects to the mail server via SMTP and sends out such letters?
EDIT: Please don't reply with a recommendation to build your own bike. Yes, this can be done without problems, but the best code is the code that is not written, but the problem is solved. I'm looking for ready-made solutions, if any.
Answer the question
In order to leave comments, you need to log in
in principle, there is nothing so complicated here
1)
Linux tool that connects to the mail server via SMTP
sending out such letters
There is a list of hundreds of names and emails, you need to send a templated text (not spam) to them
#!/usr/bin/env bash
From="[email protected]"
list='[email protected];Name1
[email protected];Name2
[email protected];Name3'
for i in $list; do
eval $(echo "$i" |awk -F';' '{print "To="$1";Name="$2}')
template="To: ${To}
From: ${From}
Subject: A test
Hello ${Name}.
"
echo -n -e "$template" | msmtp -a default "${To}"
echo "отправленно $To"
done
If you already have a mail server in your system (SendMail, Postfix, etc), then it works great in this role. Learn how mail or rmail works.
However, there is a problem: Your IP address must be correctly registered in ReverseDNS, i.e. its IP address should normally resolve to the domain name, and the domain name to the same IP address. And the domain name d.b. not suspicious - in the sense typical of spammers. And it should not. in the list of addresses from which mail should not be accepted (normal providers place their IP addresses in such lists).
If you are working under NAT, then we are talking about the external IP address of the NAT server.
If this is not done, then many mail systems will consider your letters as deliberate spam.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question