Exim - Restrict outgoing email to be from only one address - email

A bot has found a way to send bulk spam through my server. My server is not an open relay. All mails are coming from localhost. The emails are being sent from a series of FIRSTNAME_LASTNAME#mydomain.com. At mydomain, there is only 1 email account that was created that we send from.
Is there a way to restrict outgoing email that are being sent through exim to only allow emails to be sent from the 1 email account we created and block all other Sent From addressed that are being created?

You have to add the next condition to your SMTP router(s):
condition = ${if match{$sender_address}{legal#mydomain.com}{yes}{no}}

I was able to resolve this by turning on X-Headers which allowed me to locate where the emails were being executed from which in turn allowed me to eliminate an exploit from an old script.

Related

User cannot mail themself via Exchange

We currently experience the problem that a user cannot send a mail to herself.
She get the error that she's not allowed to send e-mails from this address.
(You are not allowed to send on behalf of this user...)
Her e-mail address is AAA#domain.com.
(From AAA#domain.com to AAA#domain.com)
She can:
Send e-mails internally
Send e-mails externally
Receive internal e-mails
Receive external e-mails
We make use of Office 2016 and Exchange 2010 14.03.0399.000
I found out that the local address book was corrupt.
Disabled addressbook, deleted the local file and enabled it again.
This solved the issue

Google MX telnet returns 250 OK for invalid email addresses

We are trying to figure out how to reduce the amount of bounces for our email platform and, one of the solutions we've found on the internet is to, via telnet, verify if the email exists.
So, for this example, we connect to the MX:
telnet alt4.aspmx.l.google.com 25
We start the communication:
helo hi
And, for every email we try (valid and invalid ones), we always receive the same response:
mail from: <fsafsaffsf#FasgagaoaSFasfas.co>
250 2.1.0 OK d8si998940wrc.143 - gsmtp
Are they doing this to prevent maybe a possible listing of valid emails?
What is the best way to verify if an email is valid before sending an email to it? We need this because our clients often uploads a spreadsheet with customer emails and always one or two of them are mistyped.
Thanks.
For a given recipient email address, you can:
extract its domain name (everything after #)
query DNS for the MX record(s) of that domain
for each specified server, connect and issue a VRFY command (see RFC 5321 Section 3.5), asking the server to verify the email address.
stop when you get a success reply.
However, SMTP servers are not required to implement VRFY. The simpler solution would be to just send the email normally, and then handle any errors from the RCPT TO command, and also handle the possibility that you simply can't always detect delivery errors in real time. If the email has to be relayed across servers, it might not fail on the server you use for sending, it may not fail until it is relayed to another server after you have already ended your SMTP session. In which case, the only way to detect delivery errors is to monitor your inbound mailbox for delivery failure emails being sent back to you.

DirectAdmin Blocks after 100 non-existing emails

I have installed phplist on the server for E-mail marketing but when it has send 100 E-mails to non-existing adresses DirectAdmin blocks the email account.
When this happends I must change the password but I have a list of 30.000 E-mails which needs to bounce first so I know which E-mails to delete from the database.
Is there a way to avoid the blocking and keep on sending E-mails to non-existing adresses?
I think you have setup mail limit on your server and due to that you are facing this issues, Please check following direct-admin help docs and try to update your mail limit.
https://help.directadmin.com/item.php?id=81

Mail sent from my website going to gmail spam folder when including a link

Whenever i try to send a mail from my website for email verification, the same is being received in a spam folder. I noticed that plain messages are being received in inbox, but whenever i try to include an ordinary http link[http://abcd.in/abcd/verify.php?key=2f27feb552c83c6c65b9bfc4d799e775], the mail goes to the spam folder. Cant point out the reason why this is happening. Please help me to resolve this issue.
Thanks All
From experience, I know that the spam score can be affected when hyperlinks have an alphanumeric argument tagged onto the end. I suggest trying to reformat the URL into something like;
http://abcd.in/abcd/f27feb552c83c6c65b9bfc4d799e775/verify.php
and extracting the reference using a Regex or Split()
Is your outgoing mail server configured to receive mail?
Are you using a proper mail server with proper setup at all or some bulk-mail-sending dud?
Are your mails sent with a real from address? And I don't mean the header-from that you can add in your software, but the protocol-from that is being used by sendmail
Do you have domain keys/dkim set up for your mail server?
Is the header OR the protocol from address from a different domain? Do they have set up domain keys allowing your mailserver?
Does your mail server feature the same domain name on the reverse lookup?
Does your mail server offer to receive mail for the user they are sending for?
Is your webhost using a smart relay? Do they rewrite the from: address?
Or do you send mails with internal mail address from?

Moving IMAP mail to Gmail and retaining correct times

I am trying to use gmail to manage mail from an email account I have that is imap only. My strategy was to use (getmail to retrieve mail from the server and pass it through to procmail for forwarding.
This almost works. It successfully retrieves the mail and forwards it on to my gmail account. What it does not do it keep the appropriate "sent" times. That is, an email that I received 3 months ago shows up as me having received it at the time it was forwarded.
So the question is, how can I get these mails forwarded and have their original sent times honored?
You may try to enable imap in your gmail account and use imapsync:
http://freshmeat.net/projects/imapsync/