[vchkpw] writing a relaying app
Hi there, i'm interested in using the library to write a small app that would add an IP to the relay list (open-smtp or tcp.smtp.cdb). The docs are a bit sparse on this. Idid find: int vauth_addomain( char *domain) domain = domain name to add to authentication system But I cannot find any mention of the function in any of the sources in 5.4.13, nor the library. # strings ~vpopmail/lib/libvpopmail.a | grep vauth_addomain # Doing a grep on the sources, I'm looking at cdb/cdbmake_add.c : int cdbmake_add(cdbm,h,p,alloc) cdb/cdbmake_add.c : int cdbmake_split(cdbm,alloc) Various functions in vauth.c and possibly vcdb.c int vadd_ip_map( char *ip, char *domain) or int vauth_adduser_line(FILE *, char *, char *, char *, char *, char *, int); Anyone have any more insight? I simply want to be able to add an IP to tcp.smtp.cdb for imap-before-smtp for an imap server that doesn't have that functionality for vpopmail but has functionality to execute a program after a successful login. Thanks, Darek
Re: [vchkpw] writing a relaying app
Ismail YENIGUL wrote: Hi Darek, Did you check open_smtp_relay() function in vpopmail.c If you use this function also you can also remove the IP address of the user from the tcp.smtp.cdb after a certain time-period (timeout) by modifying the tcp.smtp files (tcp.smtp, open-smtp, tcp.smtp.cdb etc) in clearopensmtp.c // #ifdef POP_AUTH_OPEN_RELAY /* This function is used to grab the user's ip address * and add it to the ip's that are allowed to relay mail * through this server. * * For mysql backend, the ip is added to the relay table * For cdb backend, the ip is added to the ~vpopmail/etc/open-smtp file * * Then the update_rules() function is called which * combines the tcp.smtp rules with the relay-table/open-smtp rules * to build a new tcp.smtp.cdb file for tcpserver to use * * This function is called after a successful pop-auth by vchkpw, * (assuming that roaming users are enabled) */ int open_smtp_relay() { ... } Thanks for the tip. Looks like it might be workable, though it uses TCPREMOTEIP from the environment, and I don't know much about the inner workings of tcpserver, so I'll probably have to cut the function out and rewrite it to accept the IP as the argument. Darek
Re: [vchkpw] writing a relaying app
Remo Mattei wrote: not sure why you have to do that since it is working :) Just my 2 cents.. Remo I don't know how I would use the existing bit of code as a standalone scriptable command line program. If it is possible, I would like to hear about it. Darek M. wrote: Ismail YENIGUL wrote: Thanks for the tip. Looks like it might be workable, though it uses TCPREMOTEIP from the environment, and I don't know much about the inner workings of tcpserver, so I'll probably have to cut the function out and rewrite it to accept the IP as the argument. Darek !DSPAM:33,469fbde9865441820820428! -- Regards, Dariusz Milewski 1.212.269.1999 [EMAIL PROTECTED] //NYI
Re: [vchkpw] writing a relaying app
Ismail YENIGUL wrote: Hi Darek, I think this can be small but nice add-on software for qmail+vpopmail systems. Which IMAP server are you using? Also can you tell me how do you configure the IMAP to run a command after log-in successfully. I'm evaluating Dovecot, over Courier. It already showed great speed increases on a system where imap-before-auth isn't used. There is a config option mail_executable which lets you execute a command after someone successfully authenticates, then it runs the main imap program. I tested with this bit of shell #!/bin/sh TCPREMOTEIP=${IP}; export TCPREMOTEIP echo ${IP} /var/log/messages exec $@ and only got my IP in messages if I logged in successfully. So all I need now is that program to update the relaying table. I'll first try to figure it out with shell/perl scripting working on open-smtp and tcp.smtp.cdb, as it will be quicker. And it looks like the vpopmail source simply appends a client's IP and other info to open-smtp, and creates tcp.smtp.cdb, and since I'm not much of a C programmer, I'll try a script first. In the mean time, are you NYI employee? I am core team member of enderunix software development team in Turkey. Our web server is provided by NYI (thanks to NYI) and we put NYI banner on our site www.enderunix.org as a result of NYI hospitality It is a small interweb, isn't it? :P Yes, I work at NYI. I've also had used your Isoqlog log analyzer in the past, so thank you for that. - Darek
[vchkpw] User quota over NFS
Hi there, My mail system consists of a main mail store, which is configured as a regular mail system, with vpopmail/qmail/etc. Incoming mail is handled by separate MX machines. They in turn mount the vpopmail directory from the main system via NFS, so they have access to the same vpopmail binaries and domain directories. So they are using the vpopmail install from the main system. Running vuserinfo shows the correct info on all MX machines. However, when a user is over 100%, mail continues to be delivered into the inbox. Does anyone have any info on this? A fix? Thanks for any info. - Darek
[vchkpw] qmail-default incorrect behavior
I'm not positive that this is a vpopmail issue, but am leaning more towards vpopmail than qmail. Perhaps it is a known issue, but I haven't been able to get any decent search results for it. When the .qmail-default file is set to bounce, mail for accounts with or without a .qmail-user file works fine. But when I set a catchall account in the .qmail-default file, if an account doesn't have a .qmail-user file, messages destined for that account are sent to the catchall account. And when I delete the .qmail-default file outright, accounts that don't have a .qmail file bounce mail destined for them, and work if the .qmail- file routes mail to their Maildir/ So overall, if the .qmail-defaul file is set to anything other than bounce or delete, accounts need a .qmail-user file to be able to receive mail. I upgraded to the latest 5.4.13 version and observed the same behavior. Has anyone seen this before?
[vchkpw] vpopmail 5.3.9 and APOP?
I could not find any documentation regarding APOP support in vpopmail. Tried the webpage, the mailing list archives, google, deja. etc and came up with nothing concrete. Could someone explain it to me briefly or provide a link to some decent documentation? I read that APOP support is included by default. Can anyone confirm this?
[vchkpw] Upgrading an old vpopmail install
Hey guys, I want to go from vpopmail-4.9.8 to probably 5.2.1, or maybe the unstable branch. This is a live system and I am a bit weary about everything working without as much as 5 minutes of downtime. The only difference that I could see between a new version and the old is the placement of tcp.smtp(.cdb) files. But that is pretty trivial. Everything else was the same. Are there any serious differences that qmail, qmailadmin, courier-imap, etc would care about? I know that there's been a lot of development going on, but from a functional and practical point of view, would qmail use vpopmail in the same exact way?