Page 1 of 1

Theoretical solution to odd question

Posted: Wed Nov 02, 2005 12:44 pm
by Dissidence
This is just a theory question (no code help needed), but it IS a simple one. I hope I didn't post in the wrong forum, but if I did please forgive me. :)

Ok, so, theoretical problem: We have a super-crummy mail server that simply cannot be changed. Rats. Well, the reason it sucks is that every so often our mail server doesn't send mail outside our own domain. Receives mail from all domains, our own and external. Problem is, it's not obvious when this happens - it's been as long as 3 days before we've discovered our mails aren't getting out (typically there were signs we missed, but hindsight's 20/20 and this only happens maybe twice a year).

So, my thoughts were to create two scripts on two servers - one that sends an e-mail twice a day, and one that checks for e-mail twice per day, and notifies me whenever one of the automated e-mails is missed.

This would seem to be easy enough to implement in our OWN mail server's domain(s), but it seems trickier when thinking about how to design this so the e-mails talk across two different servers' domains. Is there a way to write or implement an existing EXTREMELY simple mail server with PHP, that could function from it's own domain of one IP address internal to our network?

Again, I apologize if this is a silly question or if it's asked in the wrong place. :)

Posted: Wed Nov 02, 2005 12:49 pm
by timvw
What's the chance that those 2 e-mails are delivered while the others aren't? I think you might want to take that into consideration too.

Re: Theoretical solution to odd question

Posted: Thu Nov 03, 2005 12:00 am
by alex.barylski
Dissidence wrote:This is just a theory question (no code help needed), but it IS a simple one. I hope I didn't post in the wrong forum, but if I did please forgive me. :)

Ok, so, theoretical problem: We have a super-crummy mail server that simply cannot be changed. Rats. Well, the reason it sucks is that every so often our mail server doesn't send mail outside our own domain. Receives mail from all domains, our own and external. Problem is, it's not obvious when this happens - it's been as long as 3 days before we've discovered our mails aren't getting out (typically there were signs we missed, but hindsight's 20/20 and this only happens maybe twice a year).

So, my thoughts were to create two scripts on two servers - one that sends an e-mail twice a day, and one that checks for e-mail twice per day, and notifies me whenever one of the automated e-mails is missed.

This would seem to be easy enough to implement in our OWN mail server's domain(s), but it seems trickier when thinking about how to design this so the e-mails talk across two different servers' domains. Is there a way to write or implement an existing EXTREMELY simple mail server with PHP, that could function from it's own domain of one IP address internal to our network?

Again, I apologize if this is a silly question or if it's asked in the wrong place. :)
I had a similar problem once...

We were sending out emails with attachments...on a shared server...

Are you on a shared server?

Posted: Thu Nov 03, 2005 4:06 am
by Chris Corbyn
You could have a *rough* idea by registering some free email addresses on other domains (they'd need to be IMAP/POP for this to work). Every email you send out, include this handful of addresses in the list too. Have a PHP script check those mail servers to ensure the mail arrived. If 24 hrs passes and no mail... possible problem to investigate.

I couldn't think of any other, scripted way to do it.

IMAP Functions

EDIT | You'd have to embed some unique identifier in each email you send too... so that you can scan the unread emails on those servers and mark them as OK in the DB.