Thanks, Par, Yes, I realize it is all in the pskmailrc.pl I looked at your code a bit, to the extent that I understand it. The user_db.pl has nothing to do with it. But sometimes a client can't update the server with a bad HF connection, as I found. The update does not "take". Then it would be possible for the server sysop to manually update the user-db.pl file, not so ? Would that even work ? Gmail is very spam-conscious. So Gmail it makes it hard for good intented users, like PSKmailers too, unfortunately. Once you get it working, it works just fine, though. I hope other server sysops can duplicate my findings as discussed. KC9SGV On Wed, Mar 28, 2012 at 6:57 AM, Pär Crusefalk <per@xxxxxxxxxxxx> wrote: > Hi Bernard, > > I'm sorry but the server will only use one common smtp server for all > users so this may look like its working but in reality it's your > pskmailrc.pl that is doing all the heavy lifting here. > Users should of course fetch emails from their own accounts but the > server will always send outgoing emails through the one server > configured within pskmailrc.pl. Here is the code that does it: > > sub send_mail { > my($to, $from, $subject, @body)= @_; > my $smtp; > > if ($smtpauthlevel != 2) # Will not use TLS Auth > { > $smtp = Net::SMTP->new($relay, > Hello => $smtphelo, > Debug => 1,); > die "Could not open connection: $!" unless $smtp; > if ($smtpauthlevel == 1 && $smtptlsuser ne '') # Plain AUTH here > { > if ( !$smtp->auth($smtptlsuser, $smtptlspass) ) { > logprint ("SMTP authentication failed or is not needed.\n"); > } > } > } > else # Will use TLS Auth > { > logprint ("SMTP TLS requested, no debug info available..\n"); > $smtp = new Net::SMTP::TLS($relay, > Hello => $smtphelo, > Port => $smtptlsport, > User => $smtptlsuser, > Password => $smtptlspass, > Timeout => 10, > Debug => 1); > die "Could not open TLS connection: $!" if (! defined $smtp); > } > etc........ > > So, it's the parameters from pskmailrc.pl that are used. > > The problem with use of different smtp servers is also that other > servers than gmail may have restricted access to users from within their > own network. That is, comcast may have an smtp server that only > customers currently connected through comcast may access. Trying to > access that smtp server when not connected through comcast will by > default be regarded as a spam attempt. So, trying to use other smtp > servers will fail. > > That user database is somewhat confusing here, it was designed many > moons ago and the smtp server field is no longer used. > > 73 de Per, sm0rwo > > > > Bernard Dekok skrev 2012-03-28 13:15: > > Hi All, > > > > Some new tips on handling Gmail as server SMTP which worked for me. > > > > Below is an example of a working server > > *"user_db.pl <http://user_db.pl>"* file *using Gmail as SMTP host*. > > Note that the *Pop user is also with Gmail,* in this case, but with a > > *different* Gmail address account. > > The Pop user will have to go into his Gmail account and *allow access* > > to the > > server SMTP Gmail account, to access his Pop user account. > > It will work OK initially without this step above, but then later it > > suddenly won't.... > > > > K1RJV K3UK AI7RR K2MO K8ZAG KC9SGV KZ5ED > > > > Station callsign: KC9SGV > > > > Commands for KC9SGV: > > 1: Pop host = pop.gmail.com <http://pop.gmail.com> > > 2: Pop user = kc9sgv1000@xxxxxxxxx <mailto:kc9sgv1000@xxxxxxxxx> > > 3: Pop password = mysecret > > 4: SMTP server = smtp_host > > 5: From address = kc9sgv1000@xxxxxxxxx <mailto:kc9sgv1000@xxxxxxxxx> > > 6: Mail file = /home/administrator/.pskmail/.mailuser (or similar) > > 7: APRS password = none > > 9: Delete callsign > > 0: Exit > > > > Command nr: > > > > The *server station* also needs to *signed out of all Google and Gmail > > accounts* from the same IP address. > > Otherwise Gmail handles multiple simultaneous transactions as > > undesirable, and locks the server out. > > The client must enable POP, and disable IMAP in his Gmail account. > > > > Hope it works for you too. > > KC9SGV > > > > > -- > Mobile: +46703784299 > >