SMTP outbound emails stuck in Queue folder : Windows XP SP3, IIS 5.1 - email

I am using a PHP script for sending emails by IIS 5.1 SMTP.
The emails, go to outbound folder. really path is C:\Inetpub\mailroot\Queue.
after a seconds, it start to send emails properly, but after sending 5 or 6 emails, it stops to send the other ones. SMTP service is still start and it seems there is no problem to SMTP service.
but,If i restart the service, it sends 1 or 2 other emails and then, it stops again.
I mean sending emails stop but service is start.
by the way, emails are stucked in Queue folder.
Also i checked Badmail folder. it is empty
Thanks

are all the emails to the same network? I have seen behaviour like this when the recipient server bans you, yahoo's (xtra) used to do it sometimes to our server in particular. You can check the logs in event viewer for something from the smtp server, you'll find a message from the other server saying something to the effect that you have been temporarily banned, possibly with more detail about why. Trying to connect via telnet also gives you the same message.
When this happens windows will try and send them again later. Restarting the server starts to try sending again and if the ban condition has been lifted messages will flow for a while again until you are rebanned.

Related

Local email to root should not leave the host

I am trying to set up the most simple email server on an Amazon Linux 2 host for simple outbound mail (e.g. sending system messages). Following instructions on the net, I have installed mailx and sendmail. I am not committed to either package, I just want a simple setup with a minimal footprint. I have no problem switching to postfix if that is a better solution.
For configuration I have made the following changes.
/etc/sysconfig/sendmail:
DAEMON=no
/etc/mail/submit.cf (hostname obfuscated):
D{MTAHost}smtp.******.com
This works fine, and I am able to receive mail that is sent from the system.
There is a wrinkle. The anacron process is sending mail to the root account. However, rather than the mail being kept internal to the system it is being sent to the SMTP server. The SMTP server sends the message back to my host, which doesn't accept mail, and a loop is created when an 'undeliverable' message is send back to root on the host that doesn't accept mail.
How can I configure my system so email to root stays local and is not sent to the SMTP server? Any other 'best practices' suggestions would be welcome as well. And again, if switching to postfix is better, I am willing to do so (but will need configuration guidance).

Unable to send email using own domain

We are unable to send email from our own domain. We receive either "Host not match server certificate" or "Certificate is self-signed and untrusted."
These symptoms occur from kmail on ubuntu, thunderbird on windows, and thunderbird, on linux (and each on a different machine.) They also happen when trying to send direct (dmail.) Cloud-based mail like gmail (obviously) works.
Environment: home network with fiber link and internal high-speed switch. We receive all email to a single postfix install on freeBSD, and each user's MUA sucks mail from there via POP. We send directly from MUA to a relay box. This was provided by a friend until recently.
First we made sure it was not internal machine-specific. Kmail was able to ignore the exception until the last upgrade to version 20.04 kernels and corresponding kmail update. It's universal for our network.
We checked with our friend who provides the relay. All his certificates are up to date and valid. He doesn't show an exceptions coming from his server, so I presume it's on our end somewhere ... somewhow.
I tried using MUA-to-gmail.smtp.com and again got refused, "Message not transported." Seems to support the "it's our problem" issue.
I know very little about any network, server, mx, postfix, sendmail or other kind of configuration. What should I dig into, and how, so we can send mail again?

SMTP Mail Failures to a certain domain

Do the SMTP logs on a server (Windows 2003) only show logs of mail that were sent successfully?
We are getting bounce backs when sending mail to a particular domain:
The connection was dropped by the remote host.
It looks like a problem on the receiving server, but we dont have much information to provide them. We can send to hotmail, gmail, yahoo etc OK.
Any ideas?
Most likely, there is a spam filter in front of the receiving mail server for this domain, and this spam filter thinks your mail server is sending spam, so it's closing the connection from your mail server. One way to test this is to simulate sending a message to this mail server by opening a command prompt on your mail server, and use telnet to connect to the receiving mail server on port 25, and proceed with the process of sending a message just as a mail server would. This way, you'll be able to see how the receiving mail server responds after each step. Follow the instructions in http://support.microsoft.com/kb/153119 to see how this is done.
It turned out the sending server was blacklisted by McAfee, that was running on the receiving servers firewall.
For those that may have the problem in the future you can check if your server is blacklisted with McAfee here:
http://www.mcafee.com/threat-intelligence/ip/spam-senders.aspx
After entering your server IP, you should see a link Threat Feedback. Use this to email McAfee.
I was able to send McAfee an email with an explanation, they then removed our server from the blacklist.

Debian isn't capable of sending emails anymore

My VM-Ware VM running Debian 6 doesn't send emails since I moved to another house with another modem/router. I did a complete reinstall of Debian, but still I can't send email. My network adapter is set to 'Bridged' (with 'Replicate physical network connection state' enabled).
I installed an application that needs to send an email to work properly. But I can't finish it because I don't receive an email at all.
date | mail test#example.com on the command-line also doesn't work, so it hasn't something to do with the application.
Do I need to configure my router in order to send external emails from my VM?
I managed to solve the mailing-problems!
I needed to do two things:
Setting up a SMTP-server for Postfix because my ISP doesn't allow usage of port 25 without using their SMTP-server. See this reference for a how-to.
Then I needed to configure a 'send-from adress', because by default emails are sent from a localhost email adress. The SMTP-server doesn't recognizes this as valid and prevents the email from being sent. See this reference for a how-to.
It cost me almost a few days to solve it, but now I can receive outgoing emails from my Debian system :).

Accept All Incoming Email Messages on Server

I want to write some email scanning software and don't understand how to setup my server. I have a hosted web server running Windows 2003 Server. It is running the Default SMTP Virtual Server with a fully-qualified domain name of abcdef.com (example). DNS is pointing abcdef.com to my server. If I spoof an email from my desktop pc so that it appears to come from info#abcdef.com, and I send the email to a 'non-existant' email address then the bounceback does arrive on my web server and is stored in C:\inetpub\mailroot\Queue on the server - great! (I can scan it and handle the bounceback). However, if I simply send an email straight to info#abcdef.com then it does not seem to get placed anywhere on the server. I don't understand why bouncebacks get stored but other incoming email doesn't. I'm keen to avoid having to install any 'email server software' on the server, as I want to keep things as clean as possible. All I really want is some way of telling the server to accept all incoming messages to abcdef.com so that I can process them myself, and to place the .eml files in a known directory that I can scan. I'll then write an eml file parser to process the files.
Thanks very much.
A possible reason for the lack of delivery is that your domain has a DNS A record, but no DNS MX record. MX records are used for delivery of mail. Historically, if no MX record was present for a domain, mail servers were supposed to fall back to looking for a domain's A record.
In your case, I'd guess that your local mail-sending software is looking for an MX record and then stopping if it doesn't find one, whereas the remote system sending you the bounce is looking for the MX record and then looking for an A record when it can't find one.
The Wikipedia article on MX records has more details.
SMTP is a message transfer agent (MTA), responsible only for handling the transfer of mail from one point (the client, perhaps) to another (the mailbox server, such as a POP or IMAP server). SMTP servers aren't the right tool for ultimately handling mail coming INTO a domain -- they only handle transferring the mail coming into a domain to another app, such as the aforementioned POP or IMAP server, which then know how to sort and store that mail.
In short, the Default SMTP Virtual Server isn't the tool you're looking for for your project.
From this other StackOverflow question, it looks like there are a few SMTP servers which are intended for development use but which might serve the purpose you seek -- they accept incoming messages and then write them to files (in some manner, and with some tweaking).
Ok, working now. Issues were as follows:
There was no MX record, so external email wasn't being directed to the server. The .EML file that existed on the server was indeed placed there by an outbound email process.
The firewall was blocking port 25 - now opened.
It is necessary to have some sort of inbound email service running on the server. Windows Server has a lightweight POP3 service which you can configure to place all incoming email into a single 'catch-all' mailbox. This fills with .EML files, which can then be scanned by our custom service.
Many thanks to delfuego & Jon.