Qmail and NAT
The problem is: I've a public Ip address that is the MX record of my domain. the port 25 of this public ip is natted to the port 25 of a private address (192.168.5.2), on this server I've qmail of course. After that I've a Microsoft Exchange Server (192.168.5.4) that holds all the mail. I want to make my qmail like a "mail router" now the configuration of my qmail i quite correct, tha mail outbound is delivered, the problem is in inbound mail. I've wrote .mydomain.dm:192.168.5.4 in smtproutes I note that when a mail from external networks to mydomain.dm reaches my qmail, it not send the mail to the exchange server, but try to send the mail to the MX record (the public address) tha isn't reachable from internal network for nat reasons. how i can solve this problem? is a nat or qmail problem?
Re: Solaris vs. Linux vs. FreeBSD
Hi! Sean Chittenden wrote: > > What's is the best OS for run Qmail (and/or Ezmlm)? What advantage and > > disadvantage has each one? I'll need send two millions mails per day and > > I don't know what hard can I buy? :) > > Solaris is slow to fork and qmail makes liberal use of that > But ... Sun is not a valid option?? > call, so solaris is out of the question. After that, it's close between > FreeBSD and Linux. I'm pretty biased towards from FreeBSD because of > its development environment and the thoughtfulness of their engineering > team (Linux is pretty hackish). FreeBSD with softupdates turned on will > give you the best performance and reliability though amongst the three > options. Best of luck, but be careful, this smells like a troll. -sc > > -- > Sean Chittenden > > >Part 1.2Type: application/pgp-signature
Solaris vs. Linux vs. FreeBSD
What's is the best OS for run Qmail (and/or Ezmlm)? What advantage and disadvantage has each one? I'll need send two millions mails per day and I don't know what hard can I buy? :) Thanks very much!
smtp router
I need to make this possible with qmail: I've this structure INTERNETQMAIL-EXCHANGE i need that ALL incoming mail from internet are sent directly to exchange and the outgoing mail are sent normally. it is possible? how?
need to log in a database.
I now it is not too legal and a right thing, but I must register in a Database, possibly MySQL or PostgreSQL, every single incoming/outgoing mail with: + sender + receiver + body of the mail + possibly also any attachment how it is possible? thx.
Re: qmail is slow
Charles: Hi ..Thanks for the reply! Charles Cazabon wrote: > Federico Edelman Anaya <[EMAIL PROTECTED]> wrote: > > Dave Sill wrote: > > > > > You might also want to set up a second qmail installation on the central > > > server to do nothing but handle messages injected via SMTP. That will > > > allow the qmail-send sending the ezmlm messages to go full speed by > > > offloading bounce messages delivery to another qmail-send process. > > > > Ummmh.. I don't understand how can I install 2 qmail in the same server?? > > Unpack the qmail source in a separate place. Change conf-qmail to > "/var/qmail2". Do "make setup check". Start qmail-smtpd from the second > instance to receive bounces. > > Ok ... but, what do I need with the /var/qmail/queue? Must be the same or linked? How can I do for the "connection" two Qmails? Thanks! > Charles > -- > --- > Charles Cazabon<[EMAIL PROTECTED]> > GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ > Any opinions expressed are just that -- my opinions. > ---
Re: qmail is slow
Dave Sill wrote: > [EMAIL PROTECTED] wrote: > > >Well, when the Qmail of Central Server send a list (for example) about > >45.000 email subscribers, the Mail Relay's servers send about of 20 > >email at the same time. Its very slowly! But, when the Central Server > >finish, the qmail of Mail Relay send 500 mails at the same time. Why? > > Because qmail-send is single-threaded, and must split its attention > between processing new messages and passing processed messages to > qmail-rspawn. > >How can I do for the Qmail process send/receive have the same > >"priority"? I need the qmail send a constant of 500 mails. > > > >Any idea? > > Don't pass the deliveries off to relays. In doing so, you're taking > one message with 45000 recipients and making it 45000 messages with > one recipient. > > How can I do this? without ezmlm? > You might also want to set up a second qmail installation on the > central server to do nothing but handle messages injected via > SMTP. That will allow the qmail-send sending the ezmlm messages to go > full speed by offloading bounce messages delivery to another > qmail-send process. > Ummmh.. I don't understand how can I install 2 qmail in the same server?? Could you explain me how? Thanks !! > -Dave
qmail is slow
Hi! I'm running qmail-1.03 + big-concurrency.patch + big-todo.103.patch + big-dns.patch + qmail-1.03-qmtpc-mailroutes.patch + badrcptto.patch + ezmlm, Daemontools-0.70, Ucspi-tcp-0.88, Qmail-conf-1.03, djbDNS-1.05 on Linux Debian 2.2rev2. Kernel 2.4.4. The Qmail was installed on a partition with reiserFS (17GB). The servers is a Dual PII 450 Mhz, RAM 512 MB. - conf: /var/qmail/control/concurrencyremote -> 500 tcpserver accept incoming conection -> 500 I have a central server with Qmail and Ezmlm and 4 server with qmail. MX Central Server | | | roundrobin dns in /var/qmail/control/mailroutes | | | ||||__Mail Relay1) |||___ MailRelay2)to ||MailRelay3 )remote host |_MailRelay4) Well, when the Qmail of Central Server send a list (for example) about 45.000 email subscribers, the Mail Relay's servers send about of 20 email at the same time. Its very slowly! But, when the Central Server finish, the qmail of Mail Relay send 500 mails at the same time. Why? How can I do for the Qmail process send/receive have the same "priority"? I need the qmail send a constant of 500 mails. Any idea? Thanks 4 all!
Oracle eMail Server
Anybody install the Oracle eMail Server + Qmail? I'dont know how install with support of Qmail ... :( Sendmail configuration: Mlocal, P=/email01/oracle/OraHome1/bin/ofcuto, F=rlSsDCFMPpmn, S=10, R=20, A=ofcuto - /email01/oracle/OraHome1 emailsvr -f unx.cfg - $g $a $b $f $x ( $u ) # short circuit local delivery so forwarded email works R$+.ofcmail < @ $=w . > $#ofcmail $: $1 Oracle eMail Server passoff R$+.OFCMAIL < @ $=w . > $#ofcmail $: $1 Oracle eMail Server passoff # handle locally delivered names R$+.ofcmail $#ofcmail $: $1 Oracle eMail Server passoff R$+.OFCMAIL $#ofcmail $: $1 Oracle eMail Server passoff## # Last line of sendmail.cf Mofcmail, P=/email01/oracle/OraHome1/bin/ofcuto, F=rlSsDCFMPpmn, S=10, R=20, A=ofcuto - /email01/oracle/OraHome1 emailsvr -f unx.cfg - $g $a $b $f $x ( $u ) How can I translate this configuration to qmail configuarion?
qmail-spawn_unable_to_fork
Hi! How can I do to solve this problem? What's kernel parameters can I set? Thanks
Upps.. :) Kernel parameters
Hi! I'm running the Qmail-1.03(big-todo.patch and big-concurrency.path) + Ezmlm-0.53 on Linux Debian Kernel 2.2.17 I have a question! What kernel's parameters is most aproppiate for my kernel? I put in /etc/sysctl.conf fs.file-max=16384 fs.inode-max=65536 ulimit -n 8192 in /etc/init.d/qmaild <---Correction The conf-spawn limit to 509! how can I compile the qmail with 1000 in conf-spawn? Thanks..
Kernel parameters
Hi! I'm running the Qmail-1.03(big-todo.patch and big-concurrency.path) + Ezmlm-0.53 on Linux Debian Kernel 2.2.17 I have a question! What kernel's parameters is most aproppiate for my kernel? I put in /etc/sysctl.conf fs.file-max=16384 fs.inode-max=65536 uname -n 8192 in /etc/init.d/qmaild The conf-spawn limit to 509! how can I compile the qmail with 1000 in conf-spawn? Thanks..
conf-spawn
I compile the qmail with conf-spawn 509 value ... How can I setup a big value? sample: 1000 ? Thanks
QMTP
Hi! I'm running Qmail-1.03 (big-dns.patch, big-concurrency.patch, badmailfrom.patch, AND qmail-1.03-qmtpc.patch), daemontools, ucspi-tcp on testing servers. I add on my DNS: INMX12800mail.myserver.com. ; for SMTP service INMX12801mail.myserver.com. ; for QMTP service I'm running under the supervise script the qmtpd service ... when I send a mail to myserver.com, the qmail-remote communicate to SMTP instead of QMTP :( Why?? Thanks! :)
Re: qmail large usuage
Peter: echo "fs.file-max = 16384" >> /etc/sysctl.conf echo "fs.inod-max = 65536" >> /etc/sysctl.conf Try to re-compile the Qmail with conf-spawn: 509 Add to qmail rc "ulimit -n 4096" Bye! Peter van Dijk wrote: > On Wed, Mar 21, 2001 at 08:32:29AM +1100, [EMAIL PROTECTED] wrote: > > Hi, we do a mailout of about 40,000 - 50,000 emails per day to our > > clients and there clients (not spam). I have been trying to get qmail to > > work on getting up and over the 250 limitation of simulataneous > > connections. > > > > We are running hp netserver pIII 833 with 1 gig ram, the mail queue is > > running on raid 0. So I am sure we have the hardware to do it. > > I have a dual PIII-550 with 1 gig, queue on a dedicated scsi-disk. It > sends out a mailinglist to the first 10.000 recipients in just over 3 > minutes, with concurrencyremote set to 256. > > So you should have no trouble at all :) > > [note that this machine is handling a couple local deliveries (NFS) > and forwards per second in the meantime, too] > > Greetz, Peter.
Qmail + Databases
I wanna now if Qmail can help me registring and putting in a DB all the mail that the SMTP send and receive. For "all" mail i mean the whole mail sender,receiver, subject and body. there is a Qmail specific plugin or setting?
Re: Qmail - to slow?
Do you have installed the daemontools? how do you logging? syslog? multilog? Bye! Thomas König wrote: > Hi, > > I have been setup a linux-box PII/450, 256MB RAM, 4 GB IDE HDD, 100mbit > bandwitch > with RehHat 6.2, qmail 1.03 + ezmlm-idx with MySQL + vpopmail. > > qmail (standard tgz file with only the qmail-date-localtime patch) is > compiled with: > conf-split = 300 > conf-spawn = 255 > > /var/qmail/bin: > concurrencylocal = 30 > concurrencyremote = 100 > > Now I has tried to send a Newsletter to 180.000 subscribers. The system > needs 5 1/2 hours > for delivery( 9 mails per second), but I mean it's to long?! > The average bandwich during the delivery is 70k-100k it's to slightly for an > 100mbit Connection. > > If I look for qmail processes, ther are only 3-5 qmail-remote processes. > netstat -an show me 100-200 socket connections to smpt servers on port 25. > vmstat shows an average idle time between 65%-78%. > memory use is ca. 200 MB, swap is untouched. > > What can I do, for higher performance? > Have I errors in my configuration? > > -- > thomas koenig
vmailmgr VS. vpopmail
Hi! .. I have a simple question :) What's the best soft to admin mult-domains? What's differences between vmailmgr and vpopmail? Thanks!
Re: QMTP
U.. I'd like the Qmail send to QMTP if the remote host have this service .. but if the remote host don't have running de QMTP service .. my sever send to SMTP service .. :) Is this way the qmail work? Frank Tegtmeyer wrote: > > Yeah.. the port 209 is firewalled .. but.. the server1 and server2 are locals > > machines .. > > How do you route between them? > If you used smtproutes before you have to use mailroutes now. > > server1.example.com:[192.168.1.1]:209:qmtp > and > server2.example.com:[192.168.1.2]:209:qmtp > at the other machine. > > If you use DNS set the correct MX preferences (12801). > > Did you restart qmail after applying the patch? Just to be sure ... > > Regards, Frank
Re: QMTP
Yeah.. the port 209 is firewalled .. but.. the server1 and server2 are locals machines .. Frank Tegtmeyer wrote: > > But.. I don't understand how qmail work with control/mailroutes.. I can't get > > help for this implementation.. > This is documented in the updated man page for qmail-remote. > > > but I am under a firewall. I received a mail from this server. My server 1 > > send a mails to qmtp service. But, when I sent a mail from Server 1 to Server > > 2, the mail was sent to SMTP service .. I don't know what I do because > > I don't know exactly work the qmail qmtp service .. or mailroutes ..:((( > > If port 209 is firewalled at your site you will never send/receive with > qmtp. qmail-remote always falls back to smtp in this case. > > Regards, Frank
Re: QMTP
I am running qmail-1.03 + big-concurrency.patch + qmail-1.03-big-dns.patch + badrcptto.patch + qmail-1.03-qmtpc-mailroutes-1.5.patch in two servers But.. I don't understand how qmail work with control/mailroutes.. I can't get help for this implementation.. Daemontools-0.70 qmail-conf-0.54 ucspi-tcp-0.88 The system run under supervise script ( service/qmail , service/qmail-smtpd , service/qmail-qmtpd) Well.. I sent a message to [EMAIL PROTECTED] to verify my configuration .. but I am under a firewall. I received a mail from this server. My server 1 send a mails to qmtp service. But, when I sent a mail from Server 1 to Server 2, the mail was sent to SMTP service .. I don't know what I do because I don't know exactly work the qmail qmtp service .. or mailroutes ..:((( Where I can get information about this problem? :) Thanks! Frank Tegtmeyer wrote: > > Where can I get help about qmail with qmtp? > Describe your problem, then someone may be able to help you. > > If you want to run qmail-qmtpd - that's not different from qmail-smtpd. If > you want to use one of the qmtp-patches to qmail-remote you have to get > them first. Look at www.qmail.org for Russell's patch or at > http://www.almqvist.net/johan/qmail/qmail-qmtpc.html > for Johan ALmqvist's patch. > > Regards, Frank
QMTP
Where can I get help about qmail with qmtp?
Logging customization?
Hi! I have a server with 100 list and 3.5 millions of subscribers .. I am running Qmail-1.03 + big-concurrency.patch + dns.patch, ezmlm-0.53 + ezmlm-idx-0.324, ucspi-tcp-0.88 and daemontools-0.70 and qmail-conf-0.54 I am logging with multilog, I'd need logging with the follow parameters: TAI - From - To - Listname it's possible? Thanks!
Load Balancing
Actually, I have a server called MLM and 4 servers called MLM1,2,3,4 .. MLM is a central server with Qmail and EZMLM, and the other servers are the RELAY with qmail. MLM -> (smtproutes) -> MLMRELAY (dns roundrobin ) -> MLM1 -> MLM2 -> MLM3 -> MLM4 Can I change the ROUNDROBIN DNS for a Load Balancing system? Exist any software for this implementation? Thanks
Re: big-concurrency.patch
Martin: Ok! .. thanks! U.. It's posible when I apply this change the performance of the machine turn slowly? Martin Volesky wrote: > On 09/12/00 at 3:21 PM Federico Edelman Anaya wrote: > > >A few days ago .. I post on the list many question about > >big-concurrency.patch ... > > > >I was reading other list about Qmail and I get this solution about the > >problem with the FD .. > > > >The solution was: > > > >echo "65536" > /proc/sys/fs/inode-max > >echo "16384" > /proc/sys/fs/file-max > > > >So.. you need to do this every system reboot, I don't know how to make > >this persistent.. anybody have idea or know how to make this persistent? > > Under Liux 2.2.x, the way to make this persistent is to use the sysctl facility. > > add: > > fs.file-max = 16384 > fs.inode-max = 65536 > > to the sysctl.conf file in /etc, and it will be loaded up evey time you boot the >machine. > > Martin Volesky - [EMAIL PROTECTED] > CTO - Deijlabs Corporation > 1221 Mackay, Suite 200 > Montreal, Quebec, Canada > H3G 2H5 > Tel.: 514.399.9930 Fax.: 514.399.1117
big-concurrency.patch
A few days ago .. I post on the list many question about big-concurrency.patch ... I was reading other list about Qmail and I get this solution about the problem with the FD .. This is the log whit error: Report of Qmailanalog: - Errors of FD?: 24 6.36 /bin/sh: /usr/bin/ezmlm-return: Too many open files in system/ 16 28.13 /bin/sh: /usr/bin/ezmlm-weed: Too many open files in system/ 92 27.81 /bin/sh: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ 59 41.43 /bin/sh: error in loading shared libraries: libdl.so.2: cannot open shared object file: Error 23/ 48 63.30 /bin/sh: error in loading shared libraries: libncurses.so.5: cannot open shared object file: Error 23/ 58 18.57 /usr/bin/ezmlm-return: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ 106 37.99 /usr/bin/ezmlm-return: error in loading shared libraries: libcrypt.so.1: cannot open shared object file: Error 23/ 4 1.46 /usr/bin/ezmlm-return: error in loading shared libraries: libm.so.6: cannot open shared object file: Error 23/ - Other error: 851 3182.23 Connected to 200.41.50.10 but connection died. (#4.4.2)/ 1 60.03 Connected to 200.41.50.7 but connection died. (#4.4.2)/ 316 12453.57 Connected to 200.41.50.9 but connection died. (#4.4.2)/ 1 0.20 Sorry, I couldn't find any host by that name. (#4.1.2)/ 30.74 bin/qmail-local: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ The solution was: echo "65536" > /proc/sys/fs/inode-max echo "16384" > /proc/sys/fs/file-max So.. you need to do this every system reboot, I don't know how to make this persistent.. anybody have idea or know how to make this persistent? Thanks :)
Re: How can I patch with big-conrrency.patch?
James: I have many problems with FD .. - I am running Qmail + big-concurrency.patch on Linux Debian Kernel 2.2.17 (Dual Pentium II 450 Mhz RAM 512 MB) Report of Qmailanalog: - Errors of FD?: 24 6.36 /bin/sh: /usr/bin/ezmlm-return: Too many open files in system/ 16 28.13 /bin/sh: /usr/bin/ezmlm-weed: Too many open files in system/ 92 27.81 /bin/sh: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ 59 41.43 /bin/sh: error in loading shared libraries: libdl.so.2: cannot open shared object file: Error 23/ 48 63.30 /bin/sh: error in loading shared libraries: libncurses.so.5: cannot open shared object file: Error 23/ 58 18.57 /usr/bin/ezmlm-return: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ 106 37.99 /usr/bin/ezmlm-return: error in loading shared libraries: libcrypt.so.1: cannot open shared object file: Error 23/ 4 1.46 /usr/bin/ezmlm-return: error in loading shared libraries: libm.so.6: cannot open shared object file: Error 23/ - Other error: 851 3182.23 Connected to 200.41.50.10 but connection died. (#4.4.2)/ 1 60.03 Connected to 200.41.50.7 but connection died. (#4.4.2)/ 316 12453.57 Connected to 200.41.50.9 but connection died. (#4.4.2)/ 1 0.20 Sorry, I couldn't find any host by that name. (#4.1.2)/ 30.74 bin/qmail-local: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ James Stevens wrote: > Actually the patch on my system was simple. Didn't have any problems. > > Running under a Linux and can hadle 1000 Concurrent SMTP/QMQP and 1000 > Concurrent on the POP3/IMAP although thats never been tested as of yet. > But otherwise I never really had a problem with the patches any of them. > > --JT
How can I patch with big-conrrency.patch?
Hi! .. Does anybody run a Qmail with a big-concurrency.patch and don't have any problem? :) cd /usr/src/ cat big-concurrency.patch | patch -p0 cd qmail-1.03 echo "400" > conf-spawn (say 1000) ..and?.. Edit a kernel headers and recompile? or echo "-O2 -DFD_SETSIZE=16384" > conf-cc ? or what?? Thanks!
Re: HELP! Error of File Descriptos
/proc/sys/fs/file-max: 4096: /proc/sys/fs/file-nr: 1009 246 4096: /proc/sys/fs/inode-max: 16384: /proc/sys/fs/inode-nr: 16385 13846: /proc/sys/fs/inode-state: 1638513847 0 0 0 0 0: Charles Cazabon wrote: > Federico Edelman Anaya <[EMAIL PROTECTED]> wrote: > > Charles: > > ulimit is unlimited > > #!/bin/bash > > for file in /proc/sys/fs/{file,inode}* ; do > echo "$file: `cat $file`: > done > > What does the output of that say? > > Charles > -- > -- > Charles Cazabon <[EMAIL PROTECTED]> > QCC Communications Corporation Saskatoon, SK > My opinions do not necessarily represent those of my employer. > --
HELP! Error of File Descriptos
I am running Qmail with big-concurrency.patch and the conf-spawn with 400 of limit of concurrency, my control/concurrencylocal and control/concurrencyremote set to 400 The hard: - Dual Pentium II 450 Mhz - RAM 512 MB - HD 8.4 GB - Linux Debian Kernel 2.2.17 (in the /usr/src/linux/include/linux/task.h set NR_TASK to 2048) But, the Qmail say in log's: _ Report of Qmailanalog: - Errors of FD?: 24 6.36 /bin/sh: /usr/bin/ezmlm-return: Too many open files in system/ 16 28.13 /bin/sh: /usr/bin/ezmlm-weed: Too many open files in system/ 92 27.81 /bin/sh: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ 59 41.43 /bin/sh: error in loading shared libraries: libdl.so.2: cannot open shared object file: Error 23/ 48 63.30 /bin/sh: error in loading shared libraries: libncurses.so.5: cannot open shared object file: Error 23/ 58 18.57 /usr/bin/ezmlm-return: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ 106 37.99 /usr/bin/ezmlm-return: error in loading shared libraries: libcrypt.so.1: cannot open shared object file: Error 23/ 4 1.46 /usr/bin/ezmlm-return: error in loading shared libraries: libm.so.6: cannot open shared object file: Error 23/ - Other error: 851 3182.23 Connected to 200.41.50.10 but connection died. (#4.4.2)/ 1 60.03 Connected to 200.41.50.7 but connection died. (#4.4.2)/ 316 12453.57 Connected to 200.41.50.9 but connection died. (#4.4.2)/ 1 0.20 Sorry, I couldn't find any host by that name. (#4.1.2)/ 30.74 bin/qmail-local: error in loading shared libraries: libc.so.6: cannot open shared object file: Error 23/ _ What's did Y forget to do?? :) :) Help me please! :)
Hardware Requirements
What's hardware requirements I need to run a server with Qmail and Ezmlm and. - 2.000.000 subscribers - 100 newsletters - 2.000.000 deliverys for day ? Please, if anybody have idea or experience about it reply me! :) ..thanks! Federico Edelman
fastforward problem
hi all, is there a way to write into "/etc/aliases" file this row: @domain1:@domain2 so that an email sent to pippo@domain1 go to pippo@domain2. thanks a lot Federico.
mail date in qmail
hi all, why my qmail server set a date different to local date??? I red the faq #6.1, but if i set up this row : "set sendmail=/usr/bin/sendmail in mail.rc it doesn't work. Any idea??? thanks in advance federico.
tcpserver pop3
hi all, i installed tcpserver to run for pop3. this is my code line: "tcpserver -u 0 -g 0 -c 100 0 110 /var/qmail/bin/qmail-popup hostname checkpassword /var/qmail/bin/qmail-pop3d Maildir &" Is it rigtht to launch tcpserver as root??? Is it optimized?? thanks Federico.
Re: Sendmail to qmail
> I just want to know now > How can i transfer all the mails in /var/spool/mail/users (sendmail before) > in /home/users because i was using Maildir (qmail now). w/o loosing anything You can find some scripts in www.qmail.org Federico.
qmail smtp problem
hi all, i installed qmail-smtpd with tcpserver. When i try to send mail from another machine (using this as smtp server) it says: "error this domain isn't in my rcpthosts list"something like this. I set up my rcphosts variable but it doesn't work!! Any idea??? Thanks Federico.
tcpserver - checkpassword
is it possible to use checkpassword (tcpserver) with Mailbox and not Maildir?? Thanks Federico.
tcpserver problem
hi all, i am receiving lot of mail in my server. Tcpserver write me on terminal: "warning: dropping connection, unable to fork: temporary failure" What can i do to resolve this problem??? Am i losting mail?? Thanks Federico.
Re: stralloc problem
Petr Novotny wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2 May 00, at 15:21, Federico Barbazza wrote: > > > Hi all, > > if in qmail-pop3d i declared a variable: > > > > stralloc *arrayname; > > int numm = 30; > > arrayname = (stralloc *) alloc(numm * sizeof(stralloc)) > > Does alloc() initialize the memory it allocates? To which value? how can i see?? > > > for (i=0; i > stralloc_copys(&arrayname[i], "hello"); > > > > This code exit with a "segmentation fault" sometimes immediatly > > sometimes when i = 2. > > Is it a memory problem?? > > Whose memory? :-) > > Looks like the memory is initialized to arbitrary values, sometimes - > - - by chance - to NULL or something, and therefore not crashing. I saw stralloc are initializate as: stralloc variable = {0}. How can i initialize my stralloc array?? > > -BEGIN PGP SIGNATURE- > Version: PGP 6.0.2 -- QDPGP 2.60 > Comment: http://community.wow.net/grt/qdpgp.html > > iQA/AwUBOQ7JVlMwP8g7qbw/EQJ1GQCg36xGK+18R+uY62Eo+rxc6eswuQwAoNh2 > WbTpXM7VVTQtI0rPGCE6QMXj > =O9kb > -END PGP SIGNATURE- > -- > Petr Novotny, ANTEK CS > [EMAIL PROTECTED] > http://www.antek.cz > PGP key ID: 0x3BA9BC3F > -- Don't you know there ain't no devil there's just God when he's drunk. > [Tom Waits]
stralloc problem
Hi all, if in qmail-pop3d i declared a variable: stralloc *arrayname; int numm = 30; arrayname = (stralloc *) alloc(numm * sizeof(stralloc)) for (i=0; i
Re: qmail-pop3d stralloc problem
[EMAIL PROTECTED] wrote: > > On Mon, May 01, 2000 at 01:22:32PM -0700, [EMAIL PROTECTED] wrote: > > On Mon, May 01, 2000 at 10:19:57PM +0200, Federico Barbazza wrote: > > > Hi all, > > > i have a big program with stralloc variable. > > > So, in qmail-pop3d i declared a variable: > > > stralloc *arrayname; > > > arrayname = (stralloc *) alloc(numm * sizeof(stralloc)) > > > > Is that the exact code? > > > > If so, should be it sizeof(stralloc) be the sizeof the structure you > > are playing with? > > Hoy! - where did that typo come from? I meant to say, > should the sizeof(stralloc) be sizeof(yourstructure). I hope that > was clear. stralloc is a structure with a int and a char* now i tried to do this declaration: struct stralloc *arrayname; struct arrayname = (struct stralloc *) alloc(numm *sizeof(struct stralloc)) but it doesn't work. Thanks anyway.
qmail-pop3d stralloc problem
Hi all, i have a big program with stralloc variable. So, in qmail-pop3d i declared a variable: stralloc *arrayname; arrayname = (stralloc *) alloc(numm * sizeof(stralloc)) with numm as number of message. When i try to do a stralloc_copys(&arrayname[i], "hello"), qmail-pop3d exit with a "segmentation fault". The strange thing is that i get this error only when numm is great than 25.I thought ...may be a memory problemor most probably i'm not a really good c programmer. Thanks for all your suggest Federico.