Solved

Sending email via an ISP account

Posted on 1998-06-11
5
281 Views
Last Modified: 2010-04-20
Hello! I'm a Linux newbie and I'd really appreciate some help with my email problem.

***The problem***:
I can't send email via my ISP.

***What I'm using***
The Slackware 3.4 distribution, kernel 2.0.30, is installed on my personal Linux box.
I'm running BSD sendmail 8.8.7.
I'm successfully using fetchmail 4.4.7 to retrieve and read mail from my account with my ISP using POP and a simple .fetchmailrc file in my home directory:

poll mailserver.my.isp.com
protocol POP3
username <my_username_at_my_ISP>
password <my_password_at_my_ISP>
is <usename_on_my_machine>

This works great for receiving mail.

***What's happening***
When I run the outgoing mail queue to send mail via SMTP through my ISP, I get error messages saying that my machine has an unresolvable host name.

PLease help...

Periclis
0
Comment
Question by:periclis
  • 2
  • 2
5 Comments
 

Author Comment

by:periclis
ID: 1637305
Edited text of question
0
 
LVL 2

Accepted Solution

by:
richrussell earned 100 total points
ID: 1637306
Check your /etc/hosts and /etc/sendmail.cf files to see that your host name is in there in the right places. Have a look at the man page for sendmail, it's quite useful. Also have a good read through of the howto files.

I got there in the end, so I just run 'ppp-on' then sendmail gets my mail and sends any outgoing.

Have a word with your ISP, they may be able to point you in the right direction. It's worth while getting a good linux book as this is dealt with in quite a few of tem.
0
 

Expert Comment

by:viki
ID: 1637307
Hello, you need to modify your sendmail.cf for working in a LAN.
Some variables :
my.domain : your local domain
smtp.my.isp.domain : the SMTP server of your ISP
my.isp.domain : the domain of your ISP

edit a new .mc (ex foo.mc)and type (dnl is commetary):
-------cut --------------------
divert(-1)
dnl Check the location of cf.m4
include(`/usr/lib/sendmail-cf/m4/cf.m4')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
GENERICS_DOMAIN(my.domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(always_add_domain)dnl
FEATURE(masquerade_envelope)dnl
dnl The fiels FROM that the ISP gave you
dnl You will create a .db after ...
FEATURE(genericstable,``hash -N /etc/revaliases'')dnl
define(`confDOMAIN_NAME',`my.ISP.domain')dnl
define(`confSMTP_MAILER',`smtp8')dnl
dnl you will probably change this ...
define(`confDEF_CHAR_SET',`ISO-8859-1')dnl
define(`SMART_HOST',`Smtp:smtp.my.ISP.domain')dnl
dnl
dnl If you use Procmail
dnl location of procmail : /usr/bin/procmail
FEATURE(local_procmail,``/usr/bin/procmail'')
dnl by default /usr/local/bin
FEATURE(local_procmail)
dnl Comment out one of these 2 FEATUREs above
dnl depends of your case ...
dnl
MAILER(local)
MAILER(smtp)
----- cut here ------
You "masquerade" your local domain by a real domain.
You can add the cost ... means that every messages is queued until a PPP connection is made (the command is sendmail -q)
Add in the mc file :
define(`confCON_EXPENSIVE,`True')dnl
define(`SMTP_MAILER_FLAG',`e')dnl

1. Generate the sendmail.cw (save your old /etc/sendmail.cw) with:
$ m4 foo.cw > /etc/sendmail.cw
2. Put in the /etc/hosts the IP address of smtp.my.ISP.domain
XXX.XXX.XXX.XXX smtp.my.IPS.domain smtp
3. Put this line in the /etc/revaliases :
my.domain: real-adresse@my.ISP.domain
4. regenarate the base aliases
sendmail -bi -oA/etc/revaliases
5. kill sendmail
kill `head -1 /var/run/sendmail.pid`
6. restart sendmail with :
/usr/sbin/sendmail -bd -os
(you can modify the rc script to start sendmail with these options)
. OK !
Every message is kept in /var/spool/mqueue and once logged on the Internet type:
/usr/sbin/sendmail -q (to empty the queue)
You can add this line in the ip-up script

Hope this helps
Vikie



0
 

Author Comment

by:periclis
ID: 1637308
Thank you very much for the detailed response!
However, there's still a **small problem**:

I can't send mail to myself, or to other users with accounts on the same ISP, no matter whether I use as address

<email_address_at_this_ISP>@<this_ISP_domain>

or

<username_at_this_ISP>@<this_ISP_domain>

I can receive email from users with accounts on the same ISP.

These messages are queued normally when I'm not logegd in to my ISP, but when I log in to my ISP and try to run the queue they bounce with "this address had permanent fatal errors: user unknown".

Messages to recipients on remote addresses are not bouncing, but i don't know yet whether they're getting through.

Periclis
0
 

Expert Comment

by:viki
ID: 1637309
Hi,
Have a look on the /var/log/maillog to see what happens (the format of addresses)
Try to log on your linux box with the same account than your ISP gave to you (bloody english on monday morning ;-)).
Or mail me directly (vikie@iname.com)
Bye
Vikie
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Remove a folder in Linux 9 105
Linux hostname change 2 73
Install Predefined Certificate on Ubunto 4 40
How to make a Bash alias that takes parameters 5 55
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question