Version: (using Devel) Installed from: Compiled sources Compiler: 4.1.2.33 OS: Linux I am using a local smtp server (see www.uuplus.com) that listens on port 1025 to relay my mail. In kmail, if I go to Configure - Accounts - Sending and enter hostname: localhost and port: 1025, then click 'Check what the server supports', kmail does not contact the server (no trace in Wireshark) and the 'Use sendmail' button is highlighted. Clicking 'ok' and 'apply' has no effect - the account is added, but kmail just doesn't react when I send mail using that account. Remote smtp servers work fine. Using 127.0.0.1 instead of localhost produces the same problem. This is my hosts file: [user@mycomputer ~]$ cat /etc/hosts 127.0.0.1 localhost.localdomain localhost mycomputer ::1 localhost.localdomain localhost mycomputer NB uuplus also has a pop sever on port 1110 and kmail works fine with that. thanks a lot for your help M.
Note that this is a problem with the smtp server on localhost, not with the uuplus smtp programme. If I run uuplus smtp on another machine (physical or virtual), kmail connects just fine.
I'm no C++ expert, but from a bit of grepping in src/kdepim/kmail , it looks like the POP seetings dialog has code like this: mServerTest->setPort( encryptionType, mPop.ui.portEdit->value() ) where it is setting the port based on the value in the UI. On the other hand, the smtp equivalent (eg in AccountWizard::smtpCapabilities) just has : mTransport->setPort( useSSL ? 465 : 25 ); ie the port number is hardcoded to 465 or 25 depending on whether SSL is requested or not and it doesn't refer to the port number selected manually in the text box in the UI at all. Am I on the right track here? Looks like there is similar stuff for Imap (eg: account->setPort( useSSL ? 993 : 143 );) so anyone trying to use a non-standard port is out of luck. cheers M.
To try and work out what is going on here, I fired up wireshark. With the host set to 'localhost' and the portnumber set to 1025 in the kmail accounts - smtp dialog, I click on 'check what the server supports'. The attached wireshark packet file shows the traffic generated. I'm not an expert but it looks like kmail is not using the port number that is set in the options dialog, but simply defaulting to the standard port 25. If I run the uuplus server on standard port 25 (requires running as root, which I don't want to do as a matter of course) then kmail connects without a problem. So it is clearly kmail not using the correct port number that creates the problem. I did this test with revision 830974. Thanks M.
Created attachment 26110 [details] Wireshark capture file (packet data) showing that kmail does not use the port number set in the configuration dialog.