• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 537
  • Last Modified:

POP-BEFORE_SMTP, almost there I think

mail:/etc/sources/pop-before-smtp-1.36 # ls
.   COPYING    README  contrib    pop-before-smtp          pop-before-smtp.init
..  ChangeLog  TODO    nohup.out  pop-before-smtp-conf.pl  pop-before-smtp.spec
mail:/etc/sources/pop-before-smtp-1.36 # nohup pop-before-smtp --nowrite --nodebug --noflock --logfile=authlog --dbfile=popdatabse --grace=300
nohup: appending output to `nohup.out'
nohup: cannot run command `pop-before-smtp': No such file or directory
mail:/etc/sources/pop-before-smtp-1.36 #
0
wirthr
Asked:
wirthr
  • 9
  • 6
  • 6
2 Solutions
 
wesly_chenCommented:
> # nohup pop-before-smtp --nowrite --nodebug --noflock --logfile=authlog --dbfile=popdatabse --grace=300
# nohup ./pop-before-smtp --nowrite --nodebug --noflock --logfile=authlog --dbfile=popdatabse --grace=300

Wesly
0
 
wirthrAuthor Commented:
Unable to open authlog: No such file or directory at ./pop-before-smtp line 526.

the file is there, I created it in vi, and saved it.
0
 
wesly_chenCommented:
> No such file or directory at ./pop-before-smtp line 526
What's the pop-before-smtp? Shell script?
What's in line 526 of pop-before-smtp?

Wesly
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
wesly_chenCommented:
> Unable to open authlog : No such file or directory at ./pop-before-smtp line 526
How about the path of the authlog?
Put "echo $cwd" before line 526 to see where the script go.

Wesly
0
 
mac_Commented:
nohup ./pop-before-smtp --nowrite --nodebug --noflock --logfile=/full/path/to/authlog --dbfile=popdatabse --grace=300
0
 
wirthrAuthor Commented:
ok, so now it just says its appending output to nohup.out and hangs there. I do ctrl+c to get back to command line, then look at nohup.out and theres nothing in it.  Does that mean its working?  How can I test it?
0
 
mac_Commented:
I'd try to remove the --nodebug (to have some debug data) and then test it this way :

1. ls -la popdatabse and read its last modified date
2. do a pop
3. ls -la popdatabse -> date should have changed
0
 
wirthrAuthor Commented:
I can't find popdatabase, its not creating it, should I have to create this?
0
 
wesly_chenCommented:
> I can't find popdatabase
"popdatabase" should be created/updated by pop-before-smtp. Anyway, you can create one by touch.
Then use email software with POP connection such Outlook Express to send an email. And check the date of popdatabse.

By the way, what is the Linux OS? Debian?

Regards,

Wesly
0
 
mac_Commented:
Once again, maybe you should give the full path to --dbfile (as for logfile)

0
 
wirthrAuthor Commented:
how do I create one by touch?

its suse enterprise 9
0
 
mac_Commented:
man touch
0
 
wesly_chenCommented:
> how do I create one by touch
# touch popdatabse
then an empty file named "popdatabse" is created at current directory.

Wesly
0
 
wirthrAuthor Commented:
created it, tried this also "Once again, maybe you should give the full path to --dbfile (as for logfile)".  do a pop, then ls -la and the popdatabase time/date doesnt change.  there is still nothing in nohup.out
0
 
mac_Commented:
Did you try to run it with --debug as well ?
0
 
wirthrAuthor Commented:
yes, didn't do anything
0
 
wirthrAuthor Commented:
sorry, misread that, ok ran with --debug, this is the contents of nohup.out.  I replaced the actual entries with 192.168.0.0


mail:/etc/sources/pop-before-smtp-1.36 # nohup ./pop-before-smtp --nowrite --noflock --logfile=/etc/sources/pop-before-smtp-1.36/authlog --dbfile=/etc/sources/pop-before-smtp-1.36/popdatabase --debug --grace=300
nohup: appending output to `nohup.out'
mail:/etc/sources/pop-before-smtp-1.36 # vi nohup.out
Nov 14 03:57:54 starting up
Nov 14 03:57:54 Using 6 values for pre-authorized networks: `192.168.0.0/32', `192.168.0.0/32', `127.0.0.0/8', `192.168.0.0/24', `[::1]/128', `[fe80::250:baff:fec8:9958]/64'
Nov 14 03:57:54 Net::Netmask error parsing `[::1]/128': could not parse [::1]/128
Nov 14 03:57:54 Net::Netmask error parsing `[fe80::250:baff:fec8:9958]/64': could not parse [fe80::250:baff:fec8:9958]/64
Nov 14 03:57:54 caught SIGINT -- exiting
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"nohup.out" 5L, 452C                                          1,1           All
0
 
wirthrAuthor Commented:
so I pulled everything out of main.cf except local stuff, and told outlook to log into incoming mail server first, tried to send a message and it doesnt go....relay access denied.  here is the output from nohup.out

Nov 14 04:10:20 starting up
Nov 14 04:10:20 Using 2 values for pre-authorized networks: `127.0.0.0/8', `192.168.1.0/24'
Nov 14 04:10:20 caught SIGINT -- exiting
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"nohup.out" 3L, 161C                                          1,1           All
0
 
wesly_chenCommented:
> Nov 14 03:57:54 Using 6 values for pre-authorized networks: `192.168.0.0/32', `192.168.0.0/32', `127.0.0.0/8', > 
> `192.168.0.0/24', `[::1]/128', `[fe80::250:baff:fec8:9958]/64'
It looks like you have IPv6 on.

Wesly
0
 
wirthrAuthor Commented:
ok, so then what?
0
 
mac_Commented:
No matter what, you need to define the regexp that pop-before-smtp has to look for before authorizing a host. It knows a few usualy formats, but maybe not the one from your POP server.

The way pop-before-smtp works is by parsing authorization logs from your POP server's logfile. When it sees a match (ie an IP address which has been authenticated), it will allow this IP address to send e-mail as well for some pre-defined duration.

If you're not familiar with regexp (REGular EXPressions), you can give me the line in your POP logfile that tells that your have successfully POP'ed your mailbox, and I'll write the regexp for you.

You'll have to do some settings on your SMTP server as well, because it has to use the authorization file generated by pop-before-smtp.

All of this is explained the in the README that comes with pop-before-smtp. Usually, when you install a Unix/Linux application, it's really recommended to read any README or INSTALL file which is provided (or use a package for your distribution, it will usually do all the work for you).

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 9
  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now