0
0
0xC0CAC01A2020-05-14 22:08:49
linux
0xC0CAC01A, 2020-05-14 22:08:49

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

3 answer(s)
P
paran0id, 2020-05-14
@paran0id

Do you need a console mail client? A lot of them.

X
xotkot, 2020-05-15
@xotkot

in principle, there is nothing so complicated here
1)

Linux tool that connects to the mail server via SMTP

we take a simple SMTP client, for example, msmtp and configure it to the desired SMTP server, it will take 5 minutes in a simple version
2)
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

to do this, you can write a simple script that, using our previously installed and configured msmtp, will send letters to the list (list), the list itself, if desired, can be taken out into a separate file, and you can also reduce or add variables for the template to it by separating them with " ;"
the simplest version of the script:
#!/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

where the From and default values ​​(from the msmtp config) must match

K
Karpion, 2020-05-15
@Karpion

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 question

Ask a Question

731 491 924 answers to any question