Setting up smtp for mail

Setting up smtp for mail

Keith Wilkinson發表於
Number of replies: 7

I have a large problem I hope someone can help.

I am trying to set up an internal mail system for pupils. I have very little knowledge of smtp & pop and considerable difficulties in making the mail work.

System spec: Win 2k3 servers, moodle, hamster mail, php4, iis 6

I have a small domain with 10 computers attached. The domain is isolated from the school domain. I have a further server linked to the domain that contains my moodle. That is, my domain consists of 2 servers, one a domain controller using Active Directory, the other just a plain old web server.

I have tried with no success to set up smtp on the DC.

I have managed to set up Hamster Mail on the webserver (intranet only) and have managed to get moodle to post mail happily. Unfortunately, it requires addresses of the form admin@localhost to send the mail to the correct pick up place - moodle will not allow email addresses of this form. I have tried addresses such as admin@localhost.com and this works fine except it places the mail in a folder waiting to be sent out on the internet - which will never happen.

Consequently pupils cannot pick up their mail.

The situation could be resolved in two ways:

1. I could alter the code in moodle to accept the shortened form of the address (if I could find the code - or even understand the regular expression that controls it)

2. Get some help and basic understanding of how to set up smtp & pop on the DC (or even the webserver) - hence this post

There is a third way - do things properly!!! but that just takes all the fun and stress out of it 微笑

I wish to keep things very much internal - with no external access from the internet at present. When the bosses agree and are convinced this is a good system - it will be done properly.

If I am making no sense at all - I can supply further details of the system setup via email.

Thanx

Keith

評比平均分數: -
In reply to Keith Wilkinson

Re: Setting up smtp for mail

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
Let me be blunt - setting up an MTA (Mail Transfer Agent) is an exceedingly non-trivial task. It took me weeks to get everything right the first time I did it (using qmail in that case). If you have a system that is at all non-standard (which yours clearly is) it is going to be even more complicated.

The first issue is usally that you need to have a correctly configured DNS and suitable MX setting therein. That is, the system knows which MTA is to handle mail for localhost.com (although it is highly unlikely that you really want to use localhost.com). If you don't know anything about DNS then that's something else for you to read about 微笑

However, if you are determined I can try and give you some pointers - but I'm kind of hoping I have put you off!

(Oh - and what is Hamster Mail by the way - not heard of that one! Plus have a look at http://www.pmail.com/overviews/ovw_mercury.htm )
In reply to Howard Miller

Re: Setting up smtp for mail

Keith Wilkinson發表於

Thanx Howard

I think a little research is in order. DNS is a little new to me - I have been putting that one off for a while - still, nothing like diving in at the deep end.

Hamster mail is a little smtp utility that works quite well - mainly for newsgroups though.

Any help that you might have will be gratefully received.

In reply to Keith Wilkinson

Re: Setting up smtp for mail

Marcus Schubert發表於
Hi Keith,

im working with Hamster Mail for one day but i think i can help you a little, because i got the same problems.
As you said before moodle will not accept admin@localhost but admin@localhost.com. But you can make Hamster send this mails.

Im sorry, but i got the German version of Hamster cause im from Germany but i will try to translate the menu, the German menu i put in brackets, just in case you dont understand winken

  1. Open Hamster as usual
  2. Go to the menu 'options' ("Einstellungen")
  3. There you choose 'users & passwords' ("Benutzerverwaltung & Passworte")
  4. Select the user u want to change - i guess u want to change all users, so much fun Breites Grinsen
  5. Click on 'edit' ("Bearbeiten")
  6. Choose the tab 'Mail (POP3/IMAP+SMTP)'
  7. There u got it: In the field 'local email' ("Lokale Email-Adressen") is the admin@localhost, just change it to admin@localhost.com
This worked fine for me, i'm glad if i could help you.
In reply to Marcus Schubert

Re: Setting up smtp for mail

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
I'm a bit sceptical about this - but as I say I am unfamiliar with Hamster Mail. Let me explain:

localhost.com is actually a registered domain name - but it certainly doesn't belong to your domain! It belongs to Wraith Enterprises in Austin Texas (whoever they are). If you try and send mail to somebody@localhost.com then in a correctly setup system it will try and send to localhost.com's mail server which is ghost.localhost.com with the unlikely and not real IP 10.11.12.13, also unlikely to me a machine on your network. I guess it's only working at all because you are not connected to the Internet and so localhost.com isn't getting resolved.

Frankly you are better to use a domain name that you actually own. If you are definitely not/never connected to the Internet you can of course do what you like, but I think you will still need to set up a local DNS server to tell the mail system where to send mail - at least in any mail server I have worked with.
In reply to Howard Miller

Re: Setting up smtp for mail

Marcus Schubert發表於
Hi,

localhost.com was only an example. I hope Keith uses its own domain if he mails it outside his network.
In reply to Howard Miller

Re: Setting up smtp for mail

Marcus Schubert發表於
I got another remark:

With Hamster you can set the POP3 and SMTP address to the IP of the server. So you dont need a DNS-Server. At least it works in my network. Breites Grinsen
In reply to Marcus Schubert

Re: Setting up smtp for mail

Keith Wilkinson發表於

Thanks Marcus

I will give it a go today and feedback later. It sounds like just what I want to do.

Keith