LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-24-2006, 01:10 AM   #1
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Rep: Reputation: 15
how to harness native email transport abilities


Howdy. Once upon a time, back when the Internet was full of nice people who would just *never* spam anyone, I ran a few comfy old mailing lists on my Linux box to help me correspond with my contacts around the world. Bring back the good old days.

I did, at that time, have a stable IP address. Now I have a different one each time I show up on the Internet. I tried to use my sendmail today to reach some addresses, and for the most part was unsuccessful. In a perl script I used my old standby:

Code:
 open (MAIL, "|/usr/lib/sendmail -t -fctos"); 
print MAIL "Message-Id: <etuhetuhode\@ctos_network.com>\n";
print MAIL "To: \n"; 
print MAIL "Subject: \n"; # all filled in of course print MAIL "\n"; 
print MAIL "From: \n";
print MAIL "\nVarious sentences here.\n"; 
close MAIL;
I did bump up against Verizon's legendary anti-spam filter. It's so nuclear by reputation that we can discount it as a result. But in other cases I found that my host doesn't 'exist' which I take to be a reference to a lack of reverse-DNS success. In other words, my computer is not any particular number that can be consistently found by DNS.

So here is my question. Is there no way I can harness my Slackbox to send email under its own power? If Kmail can send mail, why can't I? Kmail is accessing someone else's SMTP server; what's the code for doing that myself so I don't have to use Kmail? I really don't like being wedded to GUI suites. I'd rather write my own extensible scripts that behave as I'd like.

Last edited by ctos; 03-24-2006 at 01:14 AM.
 
Old 03-24-2006, 05:55 AM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Why not setup sendmail to route all email through Verizon's SMTP server?
 
Old 03-24-2006, 08:19 AM   #3
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
Aha! Here's a relevant link (although it is six years old):
http://www.sendmail.org/~ca/email/offline_mailing.html

From the file:
Quote:
I wanted to be able to send and receive e-mail from my linux box at home that didn't have a permanent connection to the internet. Problems with sendmail and dial-up accounts include ... Being unable to send mail because messages are refused because the local host/domain does not exist. This is typicaly the case when a direct internet connection is not available. If the above is not the case, messages will appear to be sent from a machine that doesn't exist on the internet,...
Thanks for the lead!

Last edited by ctos; 03-24-2006 at 08:37 AM.
 
Old 03-24-2006, 08:56 AM   #4
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
This looks like another lead:

http://www.hserus.net/wiki/index.php/Sendmail

Quote:
More and more ISPs require you to use SMTP AUTH to authenticate yourself before sending mail through their servers. So, you can set up sendmail as an AUTH client so that it authenticates itself to the smarthost before relaying through it.
 
Old 03-25-2006, 06:03 AM   #5
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
This proved to be the key: http://www.sendmail.org/~ca/email/offline_mailing.html

For Slackware I found that the .m4 file was in cf/ostype. The linked file seems to suggest it will be in cf/cf. Anyway I'm not exactly sure why it works. I put the smarthost in (not Verizon, but one I own out there in the ether, I'd probably be struck dead for trying to use Verizon's smtp even though I pay for it?? I do have an account with them) but when I tried to change my computer's host name I stopped being able to send email. I changed it back to what it had been when I compiled sendmail 8.13 (which I did as part of this project although there was probably no need as it turns out--10.2 came with 8.13) and prepared the sendmail.cf from mklinux.m4, and then it worked again. So I am now able to send email by piping to sendmail. Hooray! I'm not sure what I'll do if I ever decide to change the little hostname here for 127.0.0.1.

Last edited by ctos; 03-25-2006 at 06:09 AM.
 
Old 03-26-2006, 03:09 PM   #6
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
Oh Drat. It isn't working after all. I am very disappointed... I am unable to communicate reliably with a correspondent on Hotmail. Early test messages worked, follow-up messages didn't work, a longer note last night went through, notes today did not--all using either Mutt or a pipe to sendmail (which is what Mutt does). Meanwhile, all Kmail messages get through. It is so disappointing not to be able to use the native abilities, to have to rely on some GUI program. Kmail has its virtues, but it's still point-and-click. I can't help but think that Pine or Mutt would be more stable or robust. And to be harnessed to a GUI is something I associate with Microsoft. I am able to get my sendmail-based system to send mail correctly to and from all three of my addresses, but not to hotmail--how many other servers would work as hotmail does? and what of hotmail contacts? Too bad.
 
Old 03-26-2006, 03:32 PM   #7
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
Don't give up too soon. I haven't embarked down this road yet, but I plan to in the near future, and I'll probably need your experience. I plan to set up a web server and a mail server on one of my own systems on my home LAN.

Anyway, I know that my current ISP (Comcast) and Verizon FIOS (that I just signed up for, not active yet) don't allow servers for residential accounts. You have to pay for a commercial account ($$$) to run servers, since they don't think private individuals have any legitimate non-commercial reasons to do so. I guess. Or they just want more money, perhaps.

You can get around the port restriction by using non-standard ports for an http server, at least until your ISP does a port scan and catches you at it. For port 25 SMTP mail you are pretty much stuck since you can't use an alternate port directly. But, you can use inbound and outbound mail redirection services from a provider like dyndns or no-ip.
 
Old 03-26-2006, 03:55 PM   #8
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
Hm, I think I'm not having a problem with ports and with whether or not servers are allowed. I'm just trying to send notes out using sendmail, instead of a GUI program that contacts a remote SMTP. Sendmail has to re-write headers, and I can't get them to 'conform' somehow, to the standards apparently of *some* other mail servers. Most of my tests worked, but to hotmail they did not work consistently. Is there any other way to send command-line mail, other than sendmail, that is worth looking in to? Anything that can take a pipe?
 
Old 03-26-2006, 04:06 PM   #9
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
This thread may be illuminating as well.
 
Old 03-27-2006, 08:39 AM   #10
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
Wow, what a wild goose chase. I have tried so many things and nothing seems to work. My latest attempts have been putmail.py and esmtp.sourceforge.net. These two programs don't come with any examples so I don't know how to set them up. I give them various commands and they either say there's an error or they just sit there. I am flummoxed. This has been a huge time cost getting the computer to send email at the command line, e.g. cat filename | sending_program. The basic problem with using sendmail proper in this way is that my computer does not have a meaningful name, consequently the headers apparently fail some spam tests (I'm guessing that's the problem). Haven't other people had this problem? What is the answer? What is Kmail doing, for example, and how can it be emulated from the command line?

Last edited by ctos; 03-27-2006 at 08:43 AM.
 
Old 03-27-2006, 10:59 PM   #11
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
This book looks promising: http://www.sendmail.org/virtual-hosting.html. I think I'm going to get that book, as it seems like the best way for me to get going on this. Have you considered buying it, ctos? I found it at Amazon, and there is another book called Sendmail Cookbook that also seems like it might be quite useful. Since these books were published in 2002 and 2003, respectively, I may run down to the used book store to see if I can find a used copy first. There were a couple of other sendmail books on Amazon too.

Also, there is an extensive FAQ on the sendmail web site. It's not written like a cookbook, though, so it is a bit tedious to wade through, and probably doesn't cover everything you might want to know.
 
Old 03-27-2006, 11:28 PM   #12
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I guess that kmail is relaying on your isp smtp's server.
Firstly, because everybody can setup their own mail server to send spam and make false from: headers, some of the servers do not rely on home users smtp servers if they do not have fully qualified domain names. You need to relay on your isp mail server because it will be thought trustful by some mail providers. Otherwise, you can try to use dyndns.org subdomain name and enable mx record forwarding (maybe it would help mail to reach you).
Don't know about hotmail cause I'm not using it but my home mail system (own smtp server) works perfectly with my gmail account and some others. If you have a hotmail adress I could try to write you and see if it works.

Last edited by Alien_Hominid; 03-27-2006 at 11:35 PM.
 
Old 03-27-2006, 11:34 PM   #13
ctos
Member
 
Registered: Mar 2006
Distribution: Slack 10.2, kernel 2.4.31 on a Dell Inspiron 1150 Laptop
Posts: 57

Original Poster
Rep: Reputation: 15
Thanks for the leads, Z. Much appreciated. I will also check into Perl's Mail::Sendmail module ( http://cpan.uwinnipeg.ca/htdocs/Mail.../Sendmail.html ). I have fetched it but not tried anything with it yet. I think my major problem is that because my desktop (or laptop actually) computer will have a 'fake' name, the headers generated by the MTA will always be at risk for appearing to be spam. I think that's why I can't get a note consistently to a hotmail contact. The hotmail server is probably ginned up to kill spam. And even if I can get through today, what happens when they tighten up the standards even further? Since I'm not a technical person there's no way I can really be sure about how the thing is behaving. Still, I note that e.g. Kmail can get mail out that looks perfect to any server. I wish there were some command-line-ready program that would duplicate its behavior, so I wouldn't be limited to a point-and-click gui environment. If anyone knows of such a beastie, please post Much obliged. I think overall though that Linux is really the bees knees. Far more stable, user-friendly, and less demanding on the computer per task. Sometimes people say it's not ready for prime time but I would reply that in fact, if someone like Dell were to release it commercially on a laptop or PC, they would of course pre-configure it, so it would work perfectly out of the box. When you're a do-it-yourself newbie like me, of course then you have to slog along somewhat, but that's not a meaningful indicator of how it would be if someone put it on a computer and sold it. Anyway, thanks for the leads.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
webcam-chat abilities vegetassj2 Linux - Software 2 04-11-2006 12:26 PM
Email Transport WLReed SUSE / openSUSE 1 10-24-2005 05:58 AM
Upon Boot-Up (Starting Email Transport) JGplt3095 Linux - Newbie 2 09-30-2005 08:55 AM
Lost RW abilities phishman3579 Slackware 3 01-27-2005 04:55 PM
More abilities to change your title Infamous Tim LQ Suggestions & Feedback 1 07-18-2001 12:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration