Theoretical solution to odd question

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Dissidence
Forum Newbie
Posts: 1
Joined: Wed Nov 02, 2005 12:30 pm

Theoretical solution to odd question

Post 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. :)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Theoretical solution to odd question

Post 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
Post Reply