Answer the question
In order to leave comments, you need to log in
How to make a stub for SMTP (outgoing messages)?
Good evening everyone.
To test sending emails, you need to build an SMTP stub for outgoing messages, but I don’t know which way to dig.
There is a server with exim installed, it is necessary that all letters are either put into a folder or forwarded to a local address, keeping the sender and recipient. After saving, stop sending letters, because. the boxes are test and do not belong to us.
Suggest possible solutions please.
UPD: It is necessary to accumulate all letters in one box or in a folder on the server so that later they can be viewed all.
Answer the question
In order to leave comments, you need to log in
Put ekzim in locale delivery only. All messages will only be sent to local mailboxes.
newbiedoc.sourceforge.net/networking/exim.html
You didn't describe the issue in great detail. As far as I understand, the server should accept letters for sending to any address, but deliver locally. Because If you need it for testing, then the easiest option would be to take the default Exim config as a basis and, for example, make changes to the dnslookup router, specifying local_delivery as the transport.
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = local_delivery
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
# if ipv6-enabled then instead use:
# ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
no_more
local_delivery:
driver = appendfile
file = /var/mail/testmail
delivery_date_add
envelope_to_add
return_path_add
# group = mail
# mode = 0660
Is this command suitable for your needs?:
sudo python -m smtpd -n -c DebuggingServer localhost:25
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question