LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sending Email to an SMTP address from sendmail (https://www.linuxquestions.org/questions/linux-newbie-8/sending-email-to-an-smtp-address-from-sendmail-151337/)

guilmetrp 02-27-2004 06:44 PM

Sending Email to an SMTP address from sendmail
 
I am not sure what this problem is, but I checked around and didn't see any posts for this specific.
I have a calander program that sends email reminders through sendmail, but my isp rejects emails that don't go to their (smtp.domain.com). How can I fix this?

Thanks

steve_babbage 02-27-2004 09:50 PM

Ive had this before.

Basically you can check your mail from the isp, but if your not on their domain when trying to send, ie logged into the isp's network, they will not reley the message. You probably know that.

But also, check the bounced email. you may see that your sendmail service is sending the email with the name appache@yourdomain.com , or root@yourdomain.com , or some other 'weird' email.

Basically i have sendmail doing stuff like this as i run a forum. When 'the forum' sends emails to the users (using sendmail) , if these users are in a corporate or govenment type business (as your isp may be considered) the IT folk/security people will not allow mails from 'services' to come in.

When i gave my forum service a real name, the problem was gone.

Check to see what the 'outgoing' or 'return' address is that is leaving your sendmail box. if it does not look like a valid name, change it.

Hope this helps

steve

guilmetrp 02-27-2004 10:20 PM

Thanks I will try that,

right now the machine name is kb2tfa.hamradio
would a better name be (www.kb2tfa.com) even if it's not real (or public)?

The sendmail is sending to ron@kb2tfa.hamradio works, but i can't check this email from outside the house because as you know it's on an intranet.

if I set the email to send to my real email address, it is bounced back on the local machine with the following error: We are not accepting email outside of the SMTP address (smtp.ispdomain.com)

For example even on a client base email program, I have to set my mail to send to a SMTP, so do you think changing the name will route the email to their SMTP?

I do have the option on my router to set up email I think. I can assign SMPT(25) to my server IP or POP3(110). Do you think this may be a work around?

:newbie:

steve_babbage 02-28-2004 07:20 AM

Quote:

Originally posted by guilmetrp
Thanks I will try that,

my thoughts, but i hope i am understanding what you are trying to do!
steve


right now the machine name is kb2tfa.hamradio
would a better name be (www.kb2tfa.com) even if it's not real (or public)?

steve -
no- normally the mail server, which i am assuming is the box you are talking about, ie the box running sendmail should be something like mail.kb2tfa.com
if you want external people to send mail to that, you router or firewall should allow that to be accessed from the outside.
Of course to do this your ip address needs to have an MX record setup, so that when people try to connect to mail.kb2tfa.com they know what the ip address.

The sendmail is sending to ron@kb2tfa.hamradio works, but i can't check this email from outside the house because as you know it's on an intranet.

if I set the email to send to my real email address, it is bounced back on the local machine with the following error: We are not accepting email outside of the SMTP address (smtp.ispdomain.com)

steve- ah yes it looks like a relay issue. Some servers come back with 'sorry we dont relay'



For example even on a client base email program, I have to set my mail to send to a SMTP, so do you think changing the name will route the email to their SMTP?
steve- maybe, but if you are not logged into your isp's 'ip address range' it will assume you are spoofing a users account and will still not relay.

I do have the option on my router to set up email I think. I can assign SMPT(25) to my server IP or POP3(110). Do you think this may be a work around?
steve- when you say to set up email, do you mean the router is sending email to an address, for logging possible attacks, or is this a port forwarding type fuction you router is doing.

Sorry i cant be more help, but if you tell me the step by step process that you want to do, i may be able to help more.
As i said, i run several servers from my home that includes doing funny stuff like this, so maybe i can help some more

steve
:newbie:


guilmetrp 02-28-2004 07:39 AM

Thanks Steve,

In short I just need my sendmail to send to a particular (smtp.ispdomain.net). Can I do this. I am not sure how sendmail works. I have documentation, but it's two dense books. I don't mind reading, but I need a starting point. This way I can narrow my reading through this 1000+ page bible :)

steve_babbage 03-01-2004 06:24 AM

Quote:

Originally posted by guilmetrp
Thanks Steve,

In short I just need my sendmail to send to a particular (smtp.ispdomain.net). Can I do this. I am not sure how sendmail works. I have documentation, but it's two dense books. I don't mind reading, but I need a starting point. This way I can narrow my reading through this 1000+ page bible :)

Yes quite simply.

Your sendmail server i am assuming has users, like root, john, harry etc.
The latter ones being restricted users.

By the fact they are real users on the machine, the have an email address of harry@localhost.localdomain

If you know the credentials of harry, ie his username (duhh) and his password, then you can simply connect to the sendmail box, making sure the sendmail process is running (just type 'top' in a command window, sorry terminal window, you should see sendmail) first by using something like eudora or another email application.

When you compose an email however, you need to make sure that the email is being sent with the user name of harry@yourdomain.com, ie your email server (sendmail) needs to be real for it not to get rejected by the isp's mail server.

Do you have your email servers ip address, or the routers public address it is sitting behind from the net registered as an MX record somewhere?
IE do you have mail.yourdomain.com registered.

You can send mail direct from the terminal of the sendmail box by typing something like 'mail -s joe@yahoo.com'

Im not sure exactly of the syntax, but it is a good way to send email from you sendmail box for testing.

Try doing a forum search for 'emailing from terminal window' or something

guilmetrp 03-01-2004 08:51 PM

If I start the xserver, I can send email from a client through sendmail, but I installed a cgi program that is a calendar which sends reminders out to me (I would hope to).
It is not a public address. It is a local linux box for personal use (no users just a cgi calendar/web server)
I looked around, and I saw one post regarding this. It seemed to talk of editing the sendmail.mc to allow for STARTLS and smtp with incription, sendmail as a client. I am a bit new for this, so this will take some time. I was not that well documented, and the post stated the same thing (not well documented).
It seem when sendmail sends(without a client) out on my ISPsnetwork, sendmail doesn't send to my isps' smtp.ispdomain.net address /with plain auth, so it is rejected. I can't find any documentation on this.

ron


All times are GMT -5. The time now is 03:58 PM.